Hey,
I'm having some troubles getting shaders to compile using the OpenGL ES emulator
"precision mediump float;\n" "attribute vec3 inPosition;\n" "attribute vec2 inTexCoords;\n" "varying vec4 Position;\n" "varying vec2 TexCoords;\n" "uniform mat4 modelMatrix;\n" "uniform mat4 viewMatrix;\n" "uniform mat4 projMatrix;\n" "void main()\n" "{\n" " mat4 MVP = projMatrix * viewMatrix * modelMatrix;\n" " Position = MVP * vec4(inPosition, 1.0);\n" " TexCoords = inTexCoords;\n" " gl_Position = Position;\n" "}\n");
This basic shader compiles if I run it on my actual Android device using GLES, however when using the emulator glGetShaderiv reports that the compilation failed but glGetShaderInfoLog returns an empty log.
Is there anything I can do to try and find out why this is failing? I've attached a table of the values I've extracted from glGetString() for reference.
Thanks!
Seems like I got this working now, looked like an error with the params I was passing to glShaderSource(), they worked on Windows + EGL on device but not with the emu wrapping, now using:
const char *strings[1] = { NULL };
strings[0] = &src[0];
glShaderSource(m_shader, 1, strings, NULL);
Instead of passing the source code string through.
Thanks