VBO and GLSL
Hello,
i am building terrain using VBO's and GLSL, and i have some problems transfering data per vertex, cause my vertices, texture coords are all puted inside VBO, so how can i pass attribute data to shader ?!
You can pass one or two colors trough the VBO that i know of, possibly even more types of data.
Now i don't know what type of atribute data you want but 8 floats per vertic should do for a while at least.
Now i don't know what type of atribute data you want but 8 floats per vertic should do for a while at least.
www.flashbang.se | www.thegeekstate.com | nehe.gamedev.net | glAux fix for lesson 6 | [twitter]thegeekstate[/twitter]
Well i've found what i was looking for :)
http://www.lighthouse3d.com/opengl/glsl/index.php?oglattribute
Passing attribute to shader per vertex is very useful, as i noticed now.
Thx for reply, but i cant pass color through vbo and use it in shader, cause i'm using it for lighting .
http://www.lighthouse3d.com/opengl/glsl/index.php?oglattribute
Passing attribute to shader per vertex is very useful, as i noticed now.
Thx for reply, but i cant pass color through vbo and use it in shader, cause i'm using it for lighting .
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement