I trying to use RenderMonkey 1.82 on Win10 PC, and graphics card is NVIDIA Geforce 405 v342.01. I cannot use the OpenGL ES examples that comes with it. I remember once I could do this on another machine. Is this an compatibility problem?
Vertex shader:
uniform mat4 view_proj_matrix;
uniform vec4 view_position;
attribute vec4 rm_Vertex;
attribute vec3 rm_Normal;
varying vec3 vNormal;
varying vec3 vViewVec;
void main(void)
{
gl_Position = view_proj_matrix * rm_Vertex;
// World-space lighting
vNormal = rm_Normal;
vViewVec = view_position.xyz - rm_Vertex.xyz;
}
Fragment shader:
precision mediump float;
uniform vec4 color;
varying vec3 vNormal;
varying vec3 vViewVec;
void main(void)
{
float v = 0.5 * (1.0 + dot(normalize(vViewVec), vNormal));
gl_FragColor = v * color;
}
The error message is:
OpenGL ES Preview Window: Compiling vertex shader API(OpenGL ES)
/../Plastic_OpenGL_ES/Single Pass/Vertex Program/ ... failure
0(8) :
error C0118: macros prefixed with 'GL_' are reserved
OpenGL ES Preview
Window: Compiling fragment shader API(OpenGL ES)
/../Plastic_OpenGL_ES/Single Pass/Fragment Program/ ... failure
0(3) :
error C0118: macros prefixed with 'GL_' are reserved
RENDERING
ERROR(s): Vertex program 'Vertex Program' failed to compile in pass
'Single Pass'. See Output window for details Fragment program
'Fragment Program' failed to compile in pass 'Single Pass'. See
Output window for details