[osg-users] Fast cycling of textured rectangles

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Fri Nov 13 11:42:36 PST 2015


Hello Christoph,

You can use either a texture which contains all the textures and modify 
the texture coordinates (so to say a matrix of different textures).
Also texture arrays might help here a lot, if all the textures are of 
the same dimensions.
Anyways, what you might you see are initial costs. Once the texture is 
transfered to the GPU and your memory is not filled, subsequent use 
should be a matter of switching texture units binding.

Cheers
Sebastian

> Hi everyone,
>
> I'm working on a project where I need to display different patterns 
> (textured rectangles) as quickly as possible. Currently, i have an 
> osgViewer with a single view running that holds a single textured 
> rectangle and upon user request, the texture / image is updated. This 
> works quite ok, but requires a CPU->GPU transfer every time I intend 
> to update the image.
>
> I think there must be a way to improve performance when I know the set 
> of patterns images beforehand. So, I would like to prepare 
> pre-rendered textured-quads on the GPU and upon user request just 
> cycle between those pre-rendered elements. That should reduce the 
> CPU->GPU overhead to initialization time.
>
> I somehow have the feeling that the solution requires a frame-buffer / 
> render-buffer object per pattern and somehow 
> involves glBlitFramebuffer to display the correct frame buffer, but 
> I'm stuck in how to implement this in OSG.
>
> Any kick start would be greatly appreciated!
>
> Best,
> Christoph
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20151113/2bbc9c75/attachment-0003.htm>


More information about the osg-users mailing list