Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

[Cg] Passing arrays to vertex shader

4: Adsense

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   

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?






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.