what is the difference/advantage to using things like GLfloat, GLvoid, GLuint..... as apposed to the regular primitive types: float, void, ....
is there any difference???
what is the difference/advantage to using things like GLfloat, GLvoid, GLuint..... as apposed to the regular primitive types: float, void, ....
is there any difference???
GLfloat, GLdouble, etc. are more portable.
In C and C++, there is nothing that says a float has to be a certain number of bytes, same goes for an int, bool, double, etc.
In the OpenGL standard, GLfloat is 4 bytes, GLdouble is 8 bytes, a GLboolean is 1 byte, etc.
Here, you want your code to be guaranteed to use the same amount of space for these datatypes, so you should use the GL datatypes whenever you can.
i will refer you to page 9 of the OpenGL 1.4 Specification.
http://www.opengl.org/developers/doc...4/glspec14.pdf
ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.