Sign in to follow this  

glCreateProgram crashes but infoLog has no errors

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

This topic is 3589 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this