[osg-users] Render to texture memory usage

0 views
Skip to first unread message

Martin Aasen

unread,
May 5, 2010, 9:32:35 AM5/5/10
to osg-...@lists.openscenegraph.org
Hi,

I am rendering to a texture using a FBO:

camera->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
camera->attach(osg::Camera_COLOR_BUFFER, texture, 0, 0, false, 0, 0);

The consumption of GPU memory is about three times higher than I would expect: about 800 MB for a 8192 x 8192 GL_RGBA texture.

Is this due to allocation of a depth buffer and others?

I don't need depth testing so that could be disabled, but I don't understand how to... I was hoping that the memory consumption of the texure was all that was needed.

Any help is much appreciated!

Cheers,
Martin

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27573#27573





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To post to this group, send email to osg-...@googlegroups.com.
To unsubscribe from this group, send email to osg-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/osg-users?hl=en.

Wojciech Lewandowski

unread,
May 5, 2010, 10:20:20 AM5/5/10
to osg-...@lists.openscenegraph.org
Hi,

Multithreading modes allocate two instances of OpenGL resources to speed up
rendering .
Default implicit buffer attachment policy adds depth buffer to FBOs if only
color buffer was attached.

Try running your app in SingleThreaded mode with Camera
implicitBufferAttachmentRenderMask set to zero.

Cheers,
Wojtek

Martin Aasen

unread,
May 5, 2010, 12:12:40 PM5/5/10
to osg-...@lists.openscenegraph.org
Thanks Wojciech,

By setting the mask the memory usage was reduced to just over 300MB.

Martin

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=27582#27582
Reply all
Reply to author
Forward
0 new messages