Hi Chris,
Am 31.01.2011 17:10, schrieb Chris 'Xenon' Hanson:
I have a situation coming up where my code will be fed large blocks of
vertex, normal,
texcoord and index data from a non-OSG code environment. The goal is to draw
this data
with DrawElements.
Currently, it looks to me like I need to rebuild some of this data (anything
Vec*-based)
into an osg::Array, which seems to necessitate copying the block.
Am I missing anything, or is there some way to get the provided simple
C-style arrays of
data over to DrawElements without a copy in the middle? I know there will be a
copy going
from the CPU to the GPU anyway, so I'd like to avoid a second, needless
CPU->CPU copy.
You can have a look at osgsharedarray in the examples-directory.
It shows how you can subclass osg::Array to use static C-array
data without copying.
Thanks in advance.
Cheers,
Peter
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org