Can someone please explain to me how to modify a display list in OpenGL once its compiled? How can I enforce, for example a matrix transformation on it?
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Display lists are immutable; you cannot alter them once created. That’s pretty much the point of them.
If you want to have geometry built into a display list that can be rendered at a place defined by a matrix, you simply don’t put matrix commands in the display list. Just put the drawing stuff in a display list. When you want to render that geometry, do the setup work (including matrix stuff) and then execute the display list.
Your current code looks something like this:
Your display list-based code should look like this: