Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

xernobyl

What is the diference between "GLvoid" and "void"?

This topic is 5616 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am starting do to something, and I found nothing saying the diference between GL vars and the standard vars... Like GLfloat, and float, GLvoid and void, etc... Can you help me?

Share this post


Link to post
Share on other sites
Advertisement
the following is taken straight from the gl.h header file.

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;

Share this post


Link to post
Share on other sites
They do this to make sure the code can be ported easily.
For example a float on a 32-bit computer has a different memory size than a float on a 64-bit computer.

So when you port your code from a 32-bit machine to a 64-bit machine the only needed change is in the OpenGL header definitions to achieve the exact same results as on the 32-bit computer.

Or at least I assume that''s the reason..

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
actually why they do this is the same reasons there are cock measurement contests in local pubs...

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
actually why they do this is the same reasons there are cock measurement contests in local pubs...


Just to prove once again that I am bigger than you?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
yup, ur much bigger if you can provide your own datatypes.,

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!