In my rib dso I am trying to pass a float array pointer in the surface call…
Say I have a RtFloat *someFloat, which is a pointer that contains an array of floats in my surface rib call I am trying the following passes
Surface( “location of shader”, (RtToken)someFloatName, &somefloat, …);
Surface( “location of shader”, (RtToken)someFloatName, somefloat, …);
Surface( “location of shader”, (RtToken)someFloatName, (RtFloat *)somefloat, …);
No matter how I do it… it always gives me the 1st index rather than a list in the shader rib.
From my poor knowledge of pointers it doesnt seem to work. Does someone here have a clue where I am going wrong?
Thanks in advance
edit
the solution is so stupid I still am trying to understand why its so…
Surface( “location of shader”, (RtToken)float[sizeOfArray] someFloatName, &somefloat, …);
so in effect one has to specify the size of the array when after the float…
the rib would look like this then: “uniform float[2] test” [0.3 0.48]