[Cg] Passing arrays to vertex shader

Started by
-1 comments, last by keym 11 years, 3 months ago

Hi,
I'm trying to write a vertex skinning shader and I'm having troubles passing any type of array to vertex shader.

Let's say I have a global array in vertex shader like this:
float ar[2];

In my application let's say I create simple array:
float v2[2]={1, 0.5f};

And then I try to pass it over like this:
cgSetParameter1fv(this->cgManager.test_array, v2);

When I do this I get "Invaild parameter handle" error. test_array parameter is binded correctly like any other non-array uniform (when I try the same thing with single variables it works). Does arrays need extra steps? How would I upload values into it?

This topic is closed to new replies.

Advertisement