Hi, I'm trying to learn how to use uniform buffers in OSG. Looking at
https://github.com/openscenegraph/OpenSceneGraph/blob/master/examples/osguniformbuffer/osguniformbuffer.cpp#L156,
it seems to use the `FloatArray` type for cpu-side memory storage of the data,
and `theFloatArray->setBufferObject(ubo.get());` to associate that data with
the UBO (for later uploading via UniformBufferBinding).
If this understanding is correct, I'm rather surprised the cpu-side storage of
the data has a custom type - an api more like `ubo->setBuffer(&theFloatArray,
theFloatArraySize)` would allow arbitrary cpu-side storage of data, within a
`std::vector`, for example.
What is the significance of the `FloatArray->setBufferObject(bufferObject)`
API, and is it required for using Uniform Buffers?
Thank you.
-P. Que
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org