ADTF_DISPLAY_TOOLBOX
3.8.0 (ADTF 3.14.3)
|
OpenGL texture class. More...
Public Member Functions | |
tResult | Create (const tBitmapFormat *psFormat, tInt nMode=0) |
tResult | CleanUp () |
tBool | IsCompatible (const tBitmapFormat *psFormat) |
tVoid | Blit (tInt x, tInt y, tInt nWidth, tInt nHeight) |
Blits a texture to the given rectangle. More... | |
operator ITexture * () | |
instance of ITexture More... | |
![]() | |
virtual | ~ITexture () |
virtual destructor to ensure proper cleanup. | |
virtual tResult | Release ()=0 |
The Function releases the Texture. More... | |
virtual tResult | SetMode (tInt nMode)=0 |
Set the Mode shown in tTextureMode. More... | |
virtual tVoid | MakeCurrent ()=0 |
Sets this texture as the current texture. | |
virtual tResult | Copy (IImage *pSource)=0 |
Fills the texture using a IImage. More... | |
virtual tInt | GetWidth () const =0 |
Gets the width of a texture (in pixel). More... | |
virtual tInt | GetHeight () const =0 |
Gets the height of a texture (in pixel). More... | |
virtual tInt | GetBitsPerPixel () const =0 |
Gets the number of bits per line of a texture. More... | |
virtual tInt | GetPhysicalWidth () const =0 |
Gets the physical width of the texture (in byte). More... | |
virtual tInt | GetPhysicalHeight () const =0 |
Gets the physical height of the texture (in byte). More... | |
Static Public Member Functions | |
static tResult | CalcOpenGLTextureFormat (const tBitmapFormat *pBitmapInfo, GLenum *pPixelType, GLenum *pBitmapFormat, GLint *pBitmapFormatInternal) |
Calculates an OpenGL texture format based on a bitmap format. More... | |
Protected Attributes | |
tUInt | m_hTexture |
tInt | m_nPhysicalWidth |
tInt | m_nPhysicalHeight |
tBitmapFormat | m_sFormat |
ITexture::tTextureMode | m_nMode |
Private Member Functions | |
A_UTILS_D (cGLTexture) | |
D-Pointer implementation. | |
Additional Inherited Members | |
![]() | |
enum | tTextureMode { MODE_BilinearFiltered , MODE_NearestPixel } |
The enumeration shows the texture modes. More... | |
OpenGL texture class.
Definition at line 31 of file gltexture.h.
tVoid Blit | ( | tInt | x, |
tInt | y, | ||
tInt | nWidth, | ||
tInt | nHeight | ||
) |
Blits a texture to the given rectangle.
The whole texture will be placed into that rectangle. Colorizing the texture by using ICanvas::Color() is not possible, because the color is set to white and the previous color is restored after blitting
x | [in] starting position inside canvas |
y | [in] starting position inside canvas |
nWidth | [in] width of the destination rectangle which receives the texture |
nHeight | [in] height of the destination rectangle which receives the texture |
|
static |
Calculates an OpenGL texture format based on a bitmap format.
[in] | pBitmapInfo | The input bitmap format. |
[out] | pPixelType | The OpenGL pixel type. |
[out] | pBitmapFormat | The OpenGL bitmap format. |
[out] | pBitmapFormatInternal | The internal OpenGL bitmap format. |
tResult CleanUp | ( | ) |
tResult Create | ( | const tBitmapFormat * | psFormat, |
tInt | nMode = 0 |
||
) |
psFormat | [in] todo |
nMode | [in] todo |
tBool IsCompatible | ( | const tBitmapFormat * | psFormat | ) |
psFormat | [in] todo |
|
inlineexplicit |
|
protected |
Definition at line 39 of file gltexture.h.
|
protected |
Definition at line 43 of file gltexture.h.
|
protected |
Definition at line 41 of file gltexture.h.
|
protected |
Definition at line 40 of file gltexture.h.
|
protected |
Definition at line 42 of file gltexture.h.