Jump to content
  • Advertisement
Sign in to follow this  
Engineered

Can't get this Shader to Setup...

This topic is 4586 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
Advertisement
Just a guess, but have a look at your compiler settings and see if you're compiling for 64 bit?

Otherwise you could dig in to find out what type __w64 refers to underneath. My guess is an arbitrary 64 bit word.

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
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!