Jump to content
  • Advertisement
Sign in to follow this  
goodperiodical

glCreateProgram crashes but infoLog has no errors

This topic is 3897 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

The length returned from glGetShaderIog is 0 but then my program crashes when I call glCreateProgram. What can I do?
	char *vert[2];
	char shaderLog[500]; int length;
	importString( "vert shader.txt", vert );

	vertShader[0] = glCreateShaderObjectARB(GL_VERTEX_SHADER);
	glShaderSourceARB( vertShader[0], 1, (const char**)vert, NULL );
	glCompileShaderARB( vertShader[0] );
	glGetShaderInfoLog( vertShader[0], 500, &length, shaderLog);

	shaderProgram[0] = glCreateProgramARB();//CRASH

Share this post


Link to post
Share on other sites
Advertisement
Ah I see what I did. I wasn't consistent in my initialization of the function. Can anyone tell me why there are two glCreateShader functions? I was expecting it to be glCreateShaderARB but it is either glCreateShader or glCreateShaderObjectARB. Which one should I be using?

Share this post


Link to post
Share on other sites
glCreateProgramARB is part of the ARB extension.
You need GL_ARB_fragment_shader, GL_ARB_vertex_shader, GL_ARB_shading_language_100, GL_ARB_shader_objects.

With core GL 2.0, they imported the functions and some have changed names.
I think glCreateProgramARB becomes glCreateShader or something like that.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!