Skip to content

Conversation

the-real-blackh
Copy link

Hi there! This change to the .cabal file makes it work on iOS.

svenpanne added a commit that referenced this pull request Aug 31, 2013
Add configuration for iOS.
@svenpanne svenpanne merged commit 233700e into haskell-opengl:master Aug 31, 2013
@svenpanne
Copy link
Member

Thanks for the patches! One tiny detail: Could you check what the actual type of GLhandle is on iOS? Mac OS X is a bit special in this regard, I am not sure about iOS.

@the-real-blackh
Copy link
Author

./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glDeleteObject,GLhandle -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glGetHandle,GLenum -> IO GLhandle)
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glDetachObject,GLhandle -> GLhandle -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glCreateShaderObject,GLenum -> IO GLhandle)
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glCreateProgramObject,IO GLhandle)
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glAttachObject,GLhandle -> GLhandle -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glUseProgramObject,GLhandle -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glGetObjectParameterfv,GLhandle -> GLenum -> Ptr GLfloat -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glGetObjectParameteriv,GLhandle -> GLenum -> Ptr GLint -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glGetInfoLog,GLhandle -> GLsizei -> Ptr GLsizei -> Ptr GLchar -> IO ())
./ARB/ShaderObjects.hs:EXTENSION_ENTRY(glGetAttachedObjects,GLhandle -> GLsizei -> Ptr GLsizei -> Ptr GLhandle -> IO ())

It looks like these are the only places where GLhandle is referenced. I haven't used shaders before but it would seem that OpenGLES does not support this API at all: I can't find any of these functions defined in the header files.

Here's an example that shows what looks like a completely different API (glCreateShader instead of glCreateShaderObject and so on).

https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/BestPracticesforShaders/BestPracticesforShaders.html

So I think the answer is that there is no GLhandle on OpenGLES.

@svenpanne
Copy link
Member

Good point, the relevant spec http://www.opengl.org/registry/specs/ARB/shader_objects.txt is roughly 10 years old, and things are subsumed by a more recent shader/program API. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants