Hi Jotschi, On Mon, Nov 30, 2009 at 6:15 PM, Johannes Schüth <[email protected]> wrote: >> Do you have to use PBO's with texture buffer? Or can you just pass >> the data directly as per normal textures? >> > > > I'm not quite sure which approach is the most fitting for my usecase. > > I want to be able to create mat4's within my shader. The floats for the > mat4's comes out of the tbo and of course the floats are very dynamic since > the mat is calculated within my main program loop. So i need way to fetch > floats within my shader which do not cost much update time. ( Time to update > the uniform value ). > > As far as i know: > 1. bindable uniforms reduce the update time since you just swap the attached > buffer object. > 2. tbo's are 1d textures that can hold a huge amount of floats. > > Do you have a idea which approach/usage of extensions would be the efficient > one for my usecase?
I can't give a definitive answer, you and Paul know more about the feature than I. The only pointer I can give is that it does look to be something you'd implement a new osg::Texture subclass for. The how to pass data in the texture buffer object is another matter, and is really decoupled as it's primarily an issue of how you pack data into a pixel buffer object. Right now PBO's are sourced from osg::Image, but potentially you can implement a more flexible PBO/BufferObject that allows you to pack a wider range of data types. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

