Win10 PC에서 RenderMonkey 1.82를 사용하려고하는데 그래픽 카드는 NVIDIA Geforce 405 v342.01입니다. 함께 제공되는 OpenGL ES 예제를 사용할 수 없습니다. 다른 컴퓨터에서이 작업을 수행 할 수있게되면 기억합니다. 호환성 문제입니까?RenderMonkey opengles 예제 컴파일이 오류로 실패했습니다. C0118 : 매크로 접두사 'GL_'가 예약되었습니다.
버텍스 쉐이더 :
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;
}
조각 쉐이더 :
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;
}
오류 메시지는 다음과 같습니다
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