Combo of Intel HD 3000 with NVidia 540M
I have a code that renders a model. It works perfectly with GLSL 1.40 on NVidia, but, when rendered the scene on Intel HD 3000 (driver version 188.8.131.5267) nothing works. The intel hd 3000 is a primary card in the OS (Windows 8 64 bit).
After spending hours in debugging and goggling I found that the following code behaves a bit differently:
CRenderEngine::__ModelMatrixUniformLocationId_Color = glGetUniformLocation(CRenderEngine::__ShaderProgramId_Color, "ModelMatrix");
CRenderEngine::__ViewMatrixUniformLocationId_Color = glGetUniformLocation(CRenderEngine::__ShaderProgramId_Color, "ViewMatrix");
CRenderEngine::__ProjectionMatrixUniformLocationId_Color = glGetUniformLocation(CRenderEngine::__ShaderProgramId_Color, "ProjectionMatrix");
ShaderProgram is initialized correctly (since it is the first program with value 1).
For NVidia chip, values for locations are 0,1,2,
But for Intel chip they are: 23855104, 23789568 and 23724032, which seems a bit not logical. glGetError gives GL_NO_ERROR.
in vec4 ex_Color;
out vec4 out_Color;
out_Color = ex_Color;
in vec4 in_Position;
in vec4 in_Color;
out vec4 ex_Color;
uniform mat4 ModelMatrix;
uniform mat4 ViewMatrix;
uniform mat4 ProjectionMatrix;
gl_Position = (ProjectionMatrix * ViewMatrix * ModelMatrix) * in_Position;
ex_Color = in_Color;
Thanks everyone for help in advance!!