Closed GoogleCodeExporter closed 9 years ago
Set(int[]) calls SetIntVectorArray, which sets an array of four-component
vectors containing integer data. This bug isn't clear enough to be actionable.
Original comment by josh.petrie
on 16 Sep 2011 at 3:07
I think the problem here is that we don't ever expose SetIntVector or
SetBoolVector, only the array variants. If you have a non-array variable for
one of those two, can you still set it using the *Array method?
Original comment by Mike.Popoloski
on 16 Sep 2011 at 3:37
Even if using the *Array method is possible(I have a feeling I tried all the
overloads) then this is far from ideal, since it leads to garbage and/or
convoluted code.
Much better would be a minimal IntVector* struct and a Set() method to take
this. Alternativly Set(int x, int y, int z) would work.
I would think this is quite a common op, and will become more common, for
example setting sizes, offsets etc for shaders.
Original comment by dbl...@fastmail.fm
on 16 Sep 2011 at 11:02
[deleted comment]
I'm still not sure what you are referring to as being less than ideal; the
limitation that the array must be a multiple of four comes from D3D, though.
It's something we can do anything about. If, on the other hand, it's just the
fact that the non-array overloads are missing, we can fix that.
Original comment by josh.petrie
on 17 Sep 2011 at 7:08
Yeah, there's no way to set less than four elements, even with the non-array
version. I assume the extra elements are just ignored for variables of smaller
size.
Anyway, adding the overloads should be easy enough.
Original comment by Mike.Popoloski
on 17 Sep 2011 at 7:44
Yeah I meant overloads which dont require any memory allocation during or
before the call.
Not sure what you are refering to wrt multiple of 4(needing to pass all
elements of the vector register to D3D)? In any case, it would probably be
fairly easy to construct a buffer with padding...
Original comment by dbl...@fastmail.fm
on 17 Sep 2011 at 8:02
This issue was closed by revision r2153.
Original comment by Mike.Popoloski
on 15 Nov 2011 at 5:06
Original issue reported on code.google.com by
dbl...@fastmail.fm
on 12 Sep 2011 at 7:08