Skip to main content
GameDev.net gamedev.net
🔒 Locked

GLSL iPhone 2.0

Started by jeffkingdev Nov 3, 2011 at 9:15 PM 0 replies 750+ views
Original Post
jeffkingdev
jeffkingdev
I have a weird issue.

My shader has the following attributes....

attribute vec3 position; attribute vec2 texCoord;

However! When I check the index w/ "glGetAttribLocation", position = 1 and texCoord = 0.

Why is that? I need them in a specific order so I don't have to do a lookup. Aren't they going to map in the order I specify them in the file?

How does OpenGL map these?

Thanks
Jeff.
FXACE
FXACE
use glBindAttibLocation with specified value which you want before calling glLinkProgram.

And then should be ok.




Best wishes, FXACE.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.