-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable the use of VAOs on mac using apple extensions. #55
Comments
The underlying mechanism in OpenGLRaw already takes care of the various vendor suffixes like "APPLE", see https://github.com/haskell-opengl/OpenGLRaw/blob/master/src/Graphics/Rendering/OpenGL/Raw/Extensions.hs. On the Haskell side you normally only see the suffix-free names, but glBindVertexArrayAPPLE is an exception: It has different semantics than the ARB version of glBindVertexArray (the latter requires all ids to have been previously generated by glGenVertexArrays, while the former auto-generates an id if required). Therefore, OpenGLRaw exposes both versions, the ARB one without a suffix and the Apple version with an "APPLE" suffix. Luckily, such semantic difference are extremely rare when extensions are promoted. So hopefully there is nothing to do for you, just drop the suffix. It might be the case that you have to use a feature from an Apple extension which is not yet in OpenGLRaw, it would be good to hear if that's the case or not. |
Okay, thanks for the explanation. I'm trying to use VAOs through GLUtils but am getting an "invalid operation" error on mac for code that works on linux, from @acowley's vinyl-gl tutorial http://www.arcadianvisions.com/blog/?p=388:
I've run into that same "invalid operation" error on my old mac that didn't support VAOs (it had an old OpenGL). After finding the apple specific functions I figured it was an issue of having to use those. I guess I need to get this code working with OpenGLRaw first to find the actual problem or stay with my current solution of not using VAOs. |
@schell Please open a GLUtil or vinyl-gl issue if this is still a problem. I do most of my development on OS X, so any problems there come as a surprise! |
@acowley I will once I figure out what's going on, thanks! 👍 |
I'm trying to use VAOs but mac requires the use of apple specific extension functions. Apple's VAO docs. It seems there are apple extension functions in OpenGLRaw What's the best way to integrate this? Double up all VAO functions with *Apple versions?
The text was updated successfully, but these errors were encountered: