OGRE  1.12.13
Object-Oriented Graphics Rendering Engine
Ogre::GLPixelUtil Class Reference

Class to do pixel format mapping between GL and OGRE. More...

#include <OgreGLPixelFormat.h>

Static Public Member Functions

static PixelFormat getClosestOGREFormat (GLenum fmt)
 Function to get the closest matching OGRE format to an internal GL format. More...
 
static GLenum getGLInternalFormat (PixelFormat mFormat, bool hwGamma=false)
 Takes the OGRE pixel format and returns the type that must be provided to GL as internal format. More...
 
static GLenum getGLOriginDataType (PixelFormat mFormat)
 Takes the OGRE pixel format and returns type that must be provided to GL as data type for reading it into the GPU. More...
 
static GLenum getGLOriginFormat (PixelFormat mFormat)
 Takes the OGRE pixel format and returns the appropriate GL one. More...
 
static uint32 optionalPO2 (uint32 value)
 Returns next power-of-two size if required by render system, in case RSC_NON_POWER_OF_2_TEXTURES is supported it returns value as-is. More...
 

Detailed Description

Class to do pixel format mapping between GL and OGRE.

Member Function Documentation

◆ getGLOriginFormat()

static GLenum Ogre::GLPixelUtil::getGLOriginFormat ( PixelFormat  mFormat)
static

Takes the OGRE pixel format and returns the appropriate GL one.

Returns
a GLenum describing the format, or 0 if there is no exactly matching one (and conversion is needed)

◆ getGLOriginDataType()

static GLenum Ogre::GLPixelUtil::getGLOriginDataType ( PixelFormat  mFormat)
static

Takes the OGRE pixel format and returns type that must be provided to GL as data type for reading it into the GPU.

Returns
a GLenum describing the data type, or 0 if there is no exactly matching one (and conversion is needed)

◆ getGLInternalFormat()

static GLenum Ogre::GLPixelUtil::getGLInternalFormat ( PixelFormat  mFormat,
bool  hwGamma = false 
)
static

Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.

GL_NONE if no match exists.

Parameters
mFormatThe pixel format
hwGammaWhether a hardware gamma-corrected version is requested

◆ getClosestOGREFormat()

static PixelFormat Ogre::GLPixelUtil::getClosestOGREFormat ( GLenum  fmt)
static

Function to get the closest matching OGRE format to an internal GL format.

To be precise, the format will be chosen that is most efficient to transfer to the card without losing precision.

Remarks
It is valid for this function to always return PF_A8R8G8B8.

◆ optionalPO2()

static uint32 Ogre::GLPixelUtil::optionalPO2 ( uint32  value)
static

Returns next power-of-two size if required by render system, in case RSC_NON_POWER_OF_2_TEXTURES is supported it returns value as-is.


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