float vs GLfloat
Heya...quick question for everyone:
Whats the difference between straightforward variables & GLvariables? eg GLfloat, GLint, GLvoid etc...
Are GLvariables stored on the gfx card for quick hardware access, or what?
When should you use which?
Cheers
Catfish
Well no difference at all.
Im not sure why they are there but it seems to me that Everyone has to make their own definitions of the standard variable types.
if you ever code ODBC, you will learn that there are SQLuint SQLTCHAR and so on..
and windows has it to BOOL just to name one
this code is taken from the top of gl.h:
so a GLfloat is really notin'' but a simple 32bit float :D
Im not sure why they are there but it seems to me that Everyone has to make their own definitions of the standard variable types.
if you ever code ODBC, you will learn that there are SQLuint SQLTCHAR and so on..
and windows has it to BOOL just to name one
this code is taken from the top of gl.h:
typedef unsigned int GLenum;typedef unsigned char GLboolean;typedef unsigned int GLbitfield;typedef signed char GLbyte;typedef short GLshort;typedef int GLint;typedef int GLsizei;typedef unsigned char GLubyte;typedef unsigned short GLushort;typedef unsigned int GLuint;typedef float GLfloat;typedef float GLclampf;typedef double GLdouble;typedef double GLclampd;typedef void GLvoid;
so a GLfloat is really notin'' but a simple 32bit float :D
Jonas Meyer Rasmussenmeyer@diku.dk
typedef float GLfloat;
It''s at the top of the opengl header.
It was just meant for those who wanted to use it.
So basically you can just use either and get the same result.
All depends on witch you think it more pretty. :D
It''s at the top of the opengl header.
It was just meant for those who wanted to use it.
So basically you can just use either and get the same result.
All depends on witch you think it more pretty. :D
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement