[osg-users] Draw Instanced
sam
brkopac at gmail.com
Fri Apr 15 11:35:28 PDT 2016
Hi All,
I'm having some trouble getting my code to use hardware instancing. I've
referenced OSGEarth, DrawInstanced example, and a few different code
samples on the web. I've gotten pretty close but I seem to be at a bit of
an impasse.
This screenshot shows what the map looks like with the default rendering:
http://imgur.com/fKvunfd
This screenshot shows what the map looks like after I apply my instance
rendering code to it:
http://imgur.com/zZCzurr
The map is composed of a lot of little nodes. I figured instanced rendering
would be helpful in this case. The map has ~4000 individual nodes. Two of
the nodes are repeated 465 and 266 times. I have trimmed down my code and
it is posted here:
http://pastebin.com/ifSVSzD6
>From what it looks like. Its rendering one copy of every nodes but not
anymore that that. I have commented out lines 215 to 224 as it doesn't work
at all. Any insight or help would be greatly appreciated.
Thanks, Sam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20160415/e292a8a6/attachment-0002.htm>
More information about the osg-users
mailing list