[osg-users] Detecting when a texture is to big for graphics memory

Robert Osfield robert.osfield at gmail.com
Wed Nov 30 08:07:50 PST 2016

Hi Alistair,

On 30 November 2016 at 15:37, Alistair Baxter <alistair at mve.com> wrote:
> In the particular test case I'm looking at, it's about 5 gigs of texture and 2 gigs of video RAM. We have a manual mechanism for downsampling, but then we can end up in situations where a processed file that looks fine on a machine with 6 or 8 gigs of video ram won't load on one with far less.
> Obviously, this is an absurdly profligate use of video memory, but if you've got the data, you might as well use it.

This is where paging coming in handy.  We have ready made solution for
2d imagery and terrain but alas not one for volume rendering yet.

> What do you mean by "have a graphics operation/callback that forces a texture compile" ? Is that sort of thing covered in the osg examples?

There a number of ways to go about it, one is add a draw callback to
the view's camera, or use a draw callback on a drawable in the scene
graph.  The other way would be to use RealizeOperation as the
osgvolume example uses to check for max support texture sizes.


More information about the osg-users mailing list