🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

VBO and GLSL

Started by
1 comment, last by todi1856 18 years, 4 months ago
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 ?!
Advertisement
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.
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 .

This topic is closed to new replies.

Advertisement