Hylke Donker
01-14-2006, 09:29 AM
Hello,
I've got a simple question regarging display lists.
If my code would look like this:
// Some where global
bool expression;
[..]
GLuint dlUID = glGenlists(1);
expression = true;
glNewList(dlUID, GL_COMPILE);
if(expression)
{
glRotate(angle, 1.0, 0.0, 0.0);
}
else
{
glRotatef(angle, 0.0, 1.0, 0.0);
}
glEndList();
expression = false;Would that always result in(like with compilers with #if statements they cut out the false statements):
glRotate(angle, 1.0, 0.0, 0.0);regardles of what expression is after compilation of the list?
And what about modes, when some function needs something enabled(lets say lights), they are when the list is compiled, but would they still need to be enabled when the list is executed?
Thanx in advance,
Hylke
I've got a simple question regarging display lists.
If my code would look like this:
// Some where global
bool expression;
[..]
GLuint dlUID = glGenlists(1);
expression = true;
glNewList(dlUID, GL_COMPILE);
if(expression)
{
glRotate(angle, 1.0, 0.0, 0.0);
}
else
{
glRotatef(angle, 0.0, 1.0, 0.0);
}
glEndList();
expression = false;Would that always result in(like with compilers with #if statements they cut out the false statements):
glRotate(angle, 1.0, 0.0, 0.0);regardles of what expression is after compilation of the list?
And what about modes, when some function needs something enabled(lets say lights), they are when the list is compiled, but would they still need to be enabled when the list is executed?
Thanx in advance,
Hylke