Advertisement Jump to content
Sign in to follow this  
Peyman Tahghighi

OpenGL Render monkey error C0118

This topic is 1748 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i'm find Render monkey to work and practice in openGL es2.0 shader language. as i start the program i add a new default opengl es 2.0 in effect workspace but when it opens i see lots of error in output window,the error is this for both fragment and vertex shader:

error C0118: macros prefixed with 'GL_' are reserved

and here is my vertex shader:

uniform mat4 matViewProjection;
attribute vec4 rm_Vertex;
void main(void)
{
   gl_Position = matViewProjection * rm_Vertex;
}

and fragment:

#ifdef GL_FRAGMENT_PRECISION_HIGH
   // Default precision
   precision highp float;
#else
   precision mediump float;
#endif

void main(void)
{
   gl_FragColor = vec4( 0.4, 0.0, 0.9, 1.0 );
}

it's so simple! and in addition i try Render monkey examples but still got this error in every vertex and fragment shader ! so what is the problem with it?

Share this post


Link to post
Share on other sites
Advertisement

hi

all shaders of the samples can be compiled successfully on my computer.

but i'm encountering a black screen.

 

is  there something wrong with my video card?

my card is nVidia GT 640 and GT650

thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!