[osg-users] Optimizing memory usage by Texture of size 4096x2048

Alistair Baxter alistair at mve.com
Tue Nov 19 08:32:26 PST 2013

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of John Moore

> I think I found the osg plugin to decompress PVR but I don't know how to use it.
> Do you have any idea?

OK, a brief look at the definitions of the PVRTC OpenGL extension and the osg code suggests that osg::Texture knows about the following compressed texture formats:


You ought to be able to specify those as the Internalformat for your texture objects somehow. Actually by calling osg::Texture:: setInternalFormatMode(osg::Texture::USE_PVRTC_2BPP_COMPRESSION) or USE_PVRTC_4BPP_COMPRESSION.

I'm not sure if osg or the drivers will do the compression for you (S3TC compression works like that on Windows, Linux and OSX), or whether you have to pass in the data you compressed with the tool.

This Apple sample code:

should show you the raw OpenGL way of dealing with compressed textures. Alternatively the PowerVR Insider SDK should have more samples, covering other platforms if need be:


Alistair Baxter
Software Engineer
Have you downloaded your FREE copy of FieldMove Clino? 
Find out more about our app for iPhone and Android smartphones:  http://news.mve.com/fieldmoveclino
Midland Valley Exploration Ltd.
144 West George Street
Glasgow G2 2HG
United Kingdom
Tel:     +44 (0) 141 332 2681
Fax:    +44 (0) 141 332 6792
The structural geology experts 

More information about the osg-users mailing list