I am encountering problems getting shaders/programs to compile and link
with SDL2 and OpenESv2 on Raspberry Pi 2.
Does anyone have a simple working example of which uses SDL2 and
with glCompileShader that catches valid/invalid shaders and glLinkProgram
that works on the Raspberry Pi 2?
For what I am experiencing every shader, regardless of correctness, returns
non zero for glGetShaderiv with GL_COMPILER_STATUS.
And every program returns 0 for glGetProgramiv with GL_LINK_STATUS.
I tested with Non-SDL2 GLESv2 triangle.c example program and the
glCompileShader / glGetShaderiv / glLinkProgram / glGetProgramiv work as
expected on my Raspberry Pi. If I alter the shader source to be invalid,
calling glGetShaderiv with GL_COMPILER_STATUS returns 0, and I am able to
retrieve the info log with test describing the error. I am unable to do
this with SDL2 on my Raspberry Pi.
Non-SDL2 correctly functioning example:
With SDL2 on my Raspberry I am able to create a GL context, clClear the
screen to any color, but I cannot get past this shader/program problem. Any
help would be appreciated.
These are the values of glGetString() when I have a valid GL context in my
SDL2 programs (which match exactly the values printed by triangle.c)
Renderer: VideoCore IV HW
Renderer: OpenGL ES 2.0
Shading Language: OpenGL ES GLSL ES 1.00
GL_OES_compressed_paletted_texture GL_OES_texture_npot GL_OES_depth24
GL_OES_vertex_half_float GL_OES_EGL_image GL_OES_EGL_image_external
GL_EXT_discard_framebuffer GL_OES_rgb8_rgba8 GL_OES_depth32
GL_OES_mapbuffer GL_EXT_texture_format_BGRA8888 GL_APPLE_rgb_422