-
Junior Member
Regular Contributor
Type aliases
I had some code that used sizeof(GL_UNSIGNED_INT). But then I changed it to sizeof(GL_UNSIGNED_SHORT), but I couldn't get it to work. It took me a couple of hours to identify the reason.
I am not asking for help, just writing to get rid of my frustration. Hopefully someone will enjoy it.
-
Junior Member
Regular Contributor
Re: Type aliases
Are you sure this was the only reason?
GL_UNSIGNED_INT is defined as 0x1405 and GL_UNSIGNED_SHORT as 0x1403, both are integers, so sizeof will return 4 for both cases.
-
Member
Regular Contributor
Re: Type aliases
McLeary is right.
You are looking for sizeof(GLuint) and sizeof(GLushort).
Just read through GL/gl.h. It's that simple.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules