Hi,
> I don't believe it would be sensible to use the same data in different
> ways, it'd have to be a pretty convoluted special case that per
> instance data would want to be used in a different way and shared.
>
I had his example to implement :
- 100 instances to draw, with 100 different instances data stored into a
VertexAttrib using VertexAttribDivisor.
- "normal" draw => ok
- "odd/even" draw => here I need to draw each odd instance in red, each even
instance in green
=> I'm still using the same data array, but with a glVertexAttribDivisor of
2, and I use 2 drawables :
first with "red" shader and 0 offset
second with "green" shader and 1 instance offset
I know this is a very special case, and I can live by handling this by myself
using draw callbacks
> It probably is time for a general discussion on osg-users about this topic.
I think so. For the moment, I see instancing as an "openGL trick" and "user
should exactly know the consequences to use it".
Thank you!
Cheers,
Aurelien
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=54383#54383
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org