accessing arrays in glsl

Started by
2 comments, last by PaulHolverda 16 years, 11 months ago
hi i want to acces array in glsl, to do plane calculations right now i have 6 different vec4 ( planeBottom, planeTop etc) but i want to acces it more easily so i can put the equations in, but is this possible to access an array "uniform float planeList[6*4];" ? regards Paul
Advertisement
Yes, you can pass arrays.
You showed the syntax correctly :P
while (tired) DrinkCoffee();
but what function do i have to call to change for instance the 15th element in this array?
okay found it:)

glUniform4fvARB(loc4,3,colors);
3 is the number of elements:)
so 12 floats in this case

This topic is closed to new replies.

Advertisement