Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


[Cg] Passing arrays to vertex shader


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 keym   Members   -  Reputation: 229

Like
0Likes
Like

Posted 21 January 2013 - 12:10 PM

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?



Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS