Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: GLhandleARB: void* or unsigned int?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GLhandleARB: void* or unsigned int? OpenGL.framework's glext.h, GLhandleARB is typedef void*, but on linux and in glew it is defined as an unsigned int: which is "correct"?

Both; the spec doesn't make any claims about what a GLhandleARB is, other than that it's at least 32 bits wide. Note that in the OpenGL 2.0 shading language API there is no GLhandle type, it uses GLuint like textures. Also note that GLuint is not an unsigned int on Mac OS X, it's an unsigned long, so you're still screwed :)

And if both are acceptable, what are some strategies for making portable code that passes the value around? Seems icky to have to coerce/cast to a pointer for one platform and not for others...

There's a handy type called "GLhandleARB" which will always have the correct type for the platform you're on...


Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

 >GLhandleARB: void* or unsigned int? (From: james tittle <email@hidden>)

Visit the Apple Store online or at retail locations.

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.