The returned buffer is an intermediate buffer which is applied only indirectly, possibly with a call to a foreign module.

This information is mostly useful in cases where some state has to be set before a foreign call could possibly occur. An examples for such action is code that utilizes MMX which should execute the 'emms' instruction before foreign code is called.

natureDirect

The returned buffer is actually a direct pointer to the texture storage.

Format of the image is determined by the format parameter. Row by row.

Remarks:

If the specified target rectangle exceeds the texture dimensions the Blit() call may have no effect. It's the responsibility of the caller to ensure that the rectangle lies completely inside the texture.

Return the original dimensions of the image used to create this texture.

This is most often equal to GetMipMapDimensions (0, mw, mh, md) but in some cases the texture will have been resized in order to accomodate hardware restrictions (like power of two and maximum texture size). This function returns the uncorrected coordinates.

virtual void iTextureHandle::GetOriginalDimensions

(

int &

mw,

int &

mh

)

[pure virtual]

Return the original dimensions of the image used to create this texture.

This is most often equal to GetMipMapDimensions (0, mw, mh) but in some cases the texture will have been resized in order to accomodate hardware restrictions (like power of two and maximum texture size). This function returns the uncorrected coordinates.

virtual bool iTextureHandle::GetRendererDimensions

(

int &

mw,

int &

mh,

int &

md

)

[pure virtual]

Get the dimensions the renderer uses for this texture.

In most cases this corresponds to the size that was used to create this texture, but some renderers have texture size limitations (like power of two) and in that case the size returned here will be the corrected size. You can get the original image size with GetOriginalDimensions().

Returns:

Whether the renderer-used dimensions could be determined.

virtual bool iTextureHandle::GetRendererDimensions

(

int &

mw,

int &

mh

)

[pure virtual]

Get the dimensions the renderer uses for this texture.

In most cases this corresponds to the size that was used to create this texture, but some renderers have texture size limitations (like power of two) and in that case the size returned here will be the corrected size. You can get the original image size with GetOriginalDimensions().

Usually, the alpha mode is auto-detected (alphaSmooth on images with alpha channels, alphaBinary on keycolored images, alphaNone otherwise), but can be overridden with this method.

virtual void iTextureHandle::SetKeyColor

(

uint8

red,

uint8

green,

uint8

blue

)

[pure virtual]

Set the key color.

virtual void iTextureHandle::SetKeyColor

(

bool

Enable

)

[pure virtual]

Enable key color.

virtual void iTextureHandle::SetMipmapLimits

(

int

maxMip,

int

minMip = 0

)

[pure virtual]

Set the highest and lowest used mipmap for this texture.

virtual void iTextureHandle::SetTextureClass

(

const char *

className

)

[pure virtual]

Set the "class" of this texture.

A texture class is used to set some characteristics on how a texture is handled at runtime. For example, graphics hardware usually offers texture compression, but it can cause a loss of quality and precision and thus may not be desireable for all data. In this case, a class can be set on the texture that instructs the renderer to not apply texture compression.