PDA

View Full Version : GLfloat and float.........



09-25-2001, 11:49 PM
hi....
my question relates the difference between OpenGL and standard C++ types like GLfloat, GLUint and float, int etc....
is there any considerable (or not) difference between them or it's just well manner to use them when programming in OpenGL?

thanks for all answers.....

Bob
09-25-2001, 11:57 PM
A GLfloat is usually typedefed as a regular float, and a GLint as a regular int, so there aren't any difference between them. Same for all other GL-types also.

Gavin
09-26-2001, 02:05 AM
I thought that the point was to continue the platform independant theme, seen as some compilers use different types for say int, as in is long or short the default.

gav

DaViper
09-26-2001, 02:15 AM
Originally posted by Bob:
A GLfloat is usually typedefed as a regular float, and a GLint as a regular int, so there aren't any difference between them. Same for all other GL-types also.

int is plattfrom dependend and GLint is not it is always at least 32 bit