VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Static Public Member Functions | Static Public Attributes
makVrv::DtOsgImageUtils Class Reference

Static Public Member Functions

static osg::Texture * createTexture (osg::Image *image)
 Creates a texture from an osg::Image.
static bool flattenImage (osg::Image *input, std::vector< osg::ref_ptr< osg::Image > > &output)
 Converts a multi-layer image (r>1) into a vector of single-layer images.
static void configureTextureForAutoReload (osg::Texture *texture)
 Configures a Texture to automatically reload its image data from the original source upon demand.

Static Public Attributes

static const std::string TAG_SOURCE_LOCATION
static const std::string TAG_LOAD_LOCATION

Member Function Documentation

static osg::Texture* makVrv::DtOsgImageUtils::createTexture ( osg::Image *  image)
static

Creates a texture from an osg::Image.

If the image has one layer (r==1) the method creates an osg::Texture2D. If the image has more than one layer (r>1) the method creates an osg::Texture2DArray.

static bool makVrv::DtOsgImageUtils::flattenImage ( osg::Image *  input,
std::vector< osg::ref_ptr< osg::Image > > &  output 
)
static

Converts a multi-layer image (r>1) into a vector of single-layer images.

static void makVrv::DtOsgImageUtils::configureTextureForAutoReload ( osg::Texture *  texture)
static

Configures a Texture to automatically reload its image data from the original source upon demand.

By default if you set a texture to unref its image data after GL apply, that will save memory but prevent the texture from working in a future and different GL context. Call this to get the benefits of both.

Member Data Documentation

const std::string makVrv::DtOsgImageUtils::TAG_SOURCE_LOCATION
static
const std::string makVrv::DtOsgImageUtils::TAG_LOAD_LOCATION
static

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)