Even when I directly include SDL_opengl.h in the source file, it tells me glUniform4f or something else is undeclared. I linked it with OpenGLES.framework too. I select the function name and click Jump to Definition and it shows it as being defined in SDL_gles2funcs.h and ES2/gl.h. What’s needed to get it working with OpenGL ES?
SDL_opengl.h is for desktop OpenGL. Since you?re using iOS (and OpenGL ES 2, presumably) you?ll want to #include ?SDL_opengles2.h? instead of SDL_opengl.h.On Jan 9, 2015, at 7:42 PM, polyfrag wrote:
I’m using the iPhone template with my own code. All the OpenGL includes are in platform.h:
Even when I directly include SDL_opengl.h in the source file, it tells me glUniform4f or something else is undeclared. I linked it with OpenGLES.framework too. I select the function name and click Jump to Definition and it shows it as being defined in SDL_gles2funcs.h and ES2/gl.h. What’s needed to get it working with OpenGL ES?