funny storry
Started by newt, Jun 26 2001 05:43 AM
3 replies to this topic
#1 Members - Reputation: 122
Posted 26 June 2001 - 05:43 AM
Just a litte hint to save you time...
I spend hours before I found this anoying bug:
All things worked well until i tryed to add a skybox. But when I did draw the box, openGL has gone mad (didn''t cleared the z-buffer, could not determine the oGL Version and the Extensions...).
But finaly this line caused all the trouble:
glEnd;
But i didn''t wrote the program in pascal (C/C++)!
Who knows whats wrong?
Sponsor:
#2 Members - Reputation: 248
Posted 26 June 2001 - 06:00 AM
It should be glEnd();
glEnd is a function.
The thing is, since functions are actually pointers, then you can type no-op statement with them also. So glEnd; is a valid C++ statement,
just like this is also valid :
though I know that if you use a function like that VC++ 6 will give you a warning.
I don't remember for GCC.
Edited by - Gorg on June 26, 2001 1:01:54 PM
glEnd is a function.
The thing is, since functions are actually pointers, then you can type no-op statement with them also. So glEnd; is a valid C++ statement,
just like this is also valid :
|
though I know that if you use a function like that VC++ 6 will give you a warning.
I don't remember for GCC.
Edited by - Gorg on June 26, 2001 1:01:54 PM






