GLSL Shaders Attributes as ints

I'm just learning OpenGL and I'm running into some issues. I'm using OpenGL 3.0 and GLSL 1.2.

I have an array of matrices which I would like to selectively apply to different vertices. Instead of copying a matrix each time I want to indicate an index, I would instead like to pass in an integer as an index and use that integer to select the matrix I want. However, when I try to compile my shader I get the following error:

ERROR: 0:5: 'attribute' : cannot be bool or int

I'd appreciate it if anybody could point me in the right direction.

5
задан LandonSchropp 23 September 2010 в 07:04
поделиться