C# Class Axiom.RenderSystems.OpenGL.GLPixelUtil

Afficher le fichier Open project: WolfgangSt/axiom Class Usage Examples

Méthodes publiques

Méthode Description
GetClosestGLInternalFormat ( PixelFormat format ) : int

Takes the Axiom pixel format and returns the type that must be provided to GL as internal format. If no match exists, returns the closest match.

GetClosestPixelFormat ( int format ) : PixelFormat

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.

It is valid for this function to always return PixelFormat.A8R8G8B8.

GetGLInternalFormat ( PixelFormat format ) : int

Takes the Axiom pixel format and returns the type that must be provided to GL as internal format. GL_NONE if no match exists.

GetGLOriginDataType ( PixelFormat format ) : int

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

GetGLOriginFormat ( PixelFormat format ) : int

Takes the Axiom pixel format and returns the appropriate GL one

GetMaxMipmaps ( int width, int height, int depth, PixelFormat format ) : int

Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible. This does not count the base level.

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.

OptionalPO2 ( int value ) : int

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.

Method Details

GetClosestGLInternalFormat() public static méthode

Takes the Axiom pixel format and returns the type that must be provided to GL as internal format. If no match exists, returns the closest match.
public static GetClosestGLInternalFormat ( PixelFormat format ) : int
format PixelFormat
Résultat int

GetClosestPixelFormat() public static méthode

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.
It is valid for this function to always return PixelFormat.A8R8G8B8.
public static GetClosestPixelFormat ( int format ) : PixelFormat
format int
Résultat PixelFormat

GetGLInternalFormat() public static méthode

Takes the Axiom pixel format and returns the type that must be provided to GL as internal format. GL_NONE if no match exists.
public static GetGLInternalFormat ( PixelFormat format ) : int
format PixelFormat
Résultat int

GetGLOriginDataType() public static méthode

Takes the Axiom pixel format and returns type that must be provided to GL as data type for reading it into the GPU
public static GetGLOriginDataType ( PixelFormat format ) : int
format PixelFormat
Résultat int

GetGLOriginFormat() public static méthode

Takes the Axiom pixel format and returns the appropriate GL one
public static GetGLOriginFormat ( PixelFormat format ) : int
format PixelFormat Axiom PixelFormat
Résultat int

GetMaxMipmaps() public static méthode

Returns the maximum number of Mipmaps that can be generated until we reach the mininum format possible. This does not count the base level.
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.
public static GetMaxMipmaps ( int width, int height, int depth, PixelFormat format ) : int
width int The width of the area
height int The height of the area
depth int The depth of the area
format PixelFormat The format of the area
Résultat int

OptionalPO2() public static méthode

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.
public static OptionalPO2 ( int value ) : int
value int
Résultat int