Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Ogre::GLPixelUtil Class Reference

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

#include <OgreGLPixelFormat.h>

List of all members.

Static Public Member Functions

GLenum getGLOriginFormat (PixelFormat mFormat)
 Takes the OGRE pixel format and returns the appropriate GL one.

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.

GLenum getClosestGLInternalFormat (PixelFormat mFormat)
 Takes the OGRE pixel format and returns the type that must be provided to GL as internal format.

PixelFormat getClosestOGREFormat (GLenum fmt)
 Function to get the closest matching OGRE format to an internal GL format.

size_t getMaxMipmaps (size_t width, size_t height, size_t depth, PixelFormat format)
 Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible.


Detailed Description

Class to do pixel format mapping between GL and OGRE.

Definition at line 34 of file OgreGLPixelFormat.h.


Member Function Documentation

GLenum Ogre::GLPixelUtil::getClosestGLInternalFormat PixelFormat  mFormat  )  [static]
 

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

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.

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)

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)

size_t Ogre::GLPixelUtil::getMaxMipmaps size_t  width,
size_t  height,
size_t  depth,
PixelFormat  format
[static]
 

Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible.

This does not count the base level.

Parameters:
width The width of the area
height The height of the area
depth The depth of the area
format The format of the area
Remarks:
In case that the format is non-compressed, this simply returns how many times we can divide this texture in 2 until we reach 1x1. For compressed formats, constraints apply on minimum size and alignment so this might differ.


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

Copyright © 2000-2005 by The OGRE Team
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Feb 12 13:10:19 2006