Sign in to follow this  

Can't get this Shader to Setup...

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

Here is the source I'm using... char fileName[255]; GLubyte * myShaderFile; GLcharARB * myShaderPtr; myProgram = glCreateProgramARB(); myFragmentShader = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); sprintf( fileName, ".\\shaders\\%s.fp", shaderName); myShaderFile = LoadShaderSourceText(fileName); //returns a GLubyte * myShaderPtr = (GLcharARB *)myShaderFile; glShaderSourceARB( myFragmentShader, 1, &myShaderPtr, NULL); The above line is where I get a compiler error... Here is what the prototype request: (GLhandleARB, GLsizei, const GLcharARB **, const GLint *) The error I'm getting is : Cannot Convert parameter 3 from 'GLcharARB ** __w64 to 'const GLcharARB **' I'm using Visual Studio 2003 Please advise, Engineered

Share this post


Link to post
Share on other sites
I just pass in a const char ** and it works for me. GLcharARB should just be a typedef to a char anyway. Perhaps for some reason it isn't in your code. It might be worth checking.

edit: actually scratch that. Just make sure it's a pointer to a const GLcharARB * you're passing in.

Share this post


Link to post
Share on other sites

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