Archived

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

GLfloat vs. float

This topic is 5776 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

To expand on what Eber Kain said:

Different development environments use different sizes for the base types. As OpenGL is cross platform and is usable in many different programming languages, it is useful to ensure that its all using the same size types, so GL defines its own.

The only time conversion between noraml and GL types would be a problem is if you need to be sure you are maintaining the same level of accuracy.

BTW GLuint is NOT equivalent to int - its equivalent to unsigned int.

Dan

Share this post


Link to post
Share on other sites
A GLuint is not necessarily equivalent to an unsigned int. OpenGL requires a GLuint to be an unsigned integer that is at least 32 bits long. In the (not so) old days, when a regular integer was 16 bit long (on some platforms), an unsigned int did not meet the requrements for the GLuint datatype. Today, this is a lesser problem though.

Share this post


Link to post
Share on other sites