Jump to content
  • Advertisement
Sign in to follow this  
ZaPPZion

OpenGL Problem with gl_MultiTexCoord0

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

Hi everyone, I'm doing some shader work in OpenGL, but I've run across a problem. When i render my mesh with the ffp, it renders correctly, but when I use a custom shader, it doesn't get the gl_MultiTexCoord0 attributes. It's actually really weird, I've tested it on multiple pc's, my desktop runs it fine, correct textures, my laptop (nvidia gfx card) however fails to get those texcoords. Another laptop with an ATI gfx card reproduced the same problem, but other laptops I've tried display correctly. It's really the simplest shader ever:
attribute vec4 gl_MultiTexCoord0;
void main() {
  gl_TexCoord[0] = gl_MultiTexCoord0;
  gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
}
To summarize: gl_MultiTexCoord0 is always (0,0,0,0), tried setting the position to it to debug. I've tried a lot of things, like binding textures and setting active textures etc. However I've never been able to fix this. Does anyone have a solution/suggestion that might fix this problem? Greetings, Bart

Share this post


Link to post
Share on other sites
Advertisement
Like Huntsman said you don't need to declare gl_MultiTexcoordn since those are reserved by GLSL . The only way you are going to get values from your app into that attribute is to use glMultiTexCoord*f in you code.

Share this post


Link to post
Share on other sites
Ahh thanks ;)
I tried almost everything, but it was a combination of options i tried. My drivers are stricter i guess, it need to render the vertices with glMultiTexCoord4f instead of 2f and I can't declare the attribute.

Thanks again:)

EDIT: Correction, multitexcoord2f works as well now, somehow.

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!