Hi Sergey,
Thanks for your guidance. The data I need per drawable might fit in 16k
floats per drawable. I need a transform and a color, but the transform
will always have a uniform scale, so that's:
- 3 floats for translation
- 4 floats for rotation quaternion
- 1 float for uniform scale
- 4 floats for color
= 12 floats.
I could probably easily pack the color into one 32-bit integer (8 bits
each for R, G, B, A) and then extract the colors into a vec4 in the
shader, so that would save an extra 3 floats.
So without doing anything really esoteric like packing multiple floats
into one, my data would fit in 9 floats. So that would be about 1777
instances' worth of data, if I have access to 16k floats.
When you mentioned using texture buffers for dynamic data, what does
that mean? I would have just used a regular float texture which I fill
with the float data each frame. What are texture buffers and how do they
differ from this? Is there an OSG example that shows how to use them?
Thanks again,
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org