| Linderdaum Engine: clGLTexture Class Reference | ![]() |
#include <GLTexture.h>
Public Member Functions | |
| clGLTexture () | |
| virtual | ~clGLTexture () |
| virtual void | AfterConstruction () |
| virtual void | Bind (int TextureUnit) const |
| Bind texture to specified texture unit. | |
| virtual void | SaveToBitmap (clBitmap *Bitmap) const |
| Write current texture content to the bitmap. | |
| virtual void | LoadFromBitmap (clBitmap *Bitmap) |
| Reload current texture content from the bitmap. | |
| virtual void | UpdateFromBitmap (clBitmap *Bitmap) |
| virtual void | UpdateSubImageFromBitmap (clBitmap *Bitmap, int X, int Y, int MIPLevel) |
| virtual sBitmapParams | GetBitmapFormat () const |
| Get format for clBitmap. | |
| virtual void | SetImage (clImage *TheImage) |
| Read texture image from TheImage. | |
| virtual void | SetMipMapping (const LMipMapping MinFilter, const LMipMapping MagFilter) |
| Set mipmapping modes for the texture. | |
| virtual void | SetClamping (const LClamping Clamping) |
| Set clamping mode for the texture. | |
| virtual void | UpdateMipmaps () |
| Regenerate mipmaps. Useful to update the texture dynamicaly. | |
| virtual void | SetFormat (Lenum Target, Lenum InternalFormat, Lenum Format, int Width, int Height, int Depth) |
| Set format of the texture's data. | |
| virtual void | AttachToCurrentFB (Lenum Attachment, int ZSlice) |
| Attach texture to the currently binded framebuffer. | |
| FWD_EVENT_HANDLER (Event_SURFACE_DETACHED) | |
| FWD_EVENT_HANDLER (Event_SURFACE_ATTACHED) | |
Protected Member Functions | |
| virtual void | CommitChanges () |
| If the attached image has changed then update the GL texture. | |
| virtual Lenum | GetTextureTarget () const |
| virtual void | TexSubImage (Luint Level, Lint OffsetX, Lint OffsetY, Luint Width, Luint Height, Luint Depth, Lenum Format, Lenum DataType, const Lubyte *RawPixelData) |
| virtual void | TexImage (Lenum InternalFormat, Luint Width, Luint Height, Luint Depth, Lenum Format, Lenum DataType, const Lubyte *RawPixelData) |
| virtual void | TexImageCompressed (Lenum InternalFormat, Luint Width, Luint Height, Luint Depth, Luint CompressedSize, const Lubyte *RawPixelData) |
| virtual void | GetTexImageCompressed (Lubyte *Image) const |
| virtual void | GetTexImageCompressedSizeAndInternalFormat (Lint *Size, Lenum *InternalFormat) const |
Private Member Functions | |
| Lenum | GetDataFormat (const sBitmapParams &Bitmap) const |
| void | SetupTexParameters () const |
Private Attributes | |
| Lenum | FTextureTarget |
| Luint | FTexID |
| bool | FCompressed |
| Lenum | FMinFilter |
| Lenum | FMagFilter |
| Lenum | FClamping |
| Luint | FPBO |
| bool | FAttachedToFBO |
| Lenum | FInternalFormat |
| Lenum | FFormat |
| clCVar * | FTextureRebinds |
| stats | |
| clGLTexture::clGLTexture | ( | ) |
| clGLTexture::~clGLTexture | ( | ) | [virtual] |
| void clGLTexture::AfterConstruction | ( | ) | [virtual] |
Reimplemented from iObject.
Attach texture to the currently binded framebuffer.
Implements iTexture.
| void clGLTexture::Bind | ( | int | TextureUnit | ) | const [virtual] |
Bind texture to specified texture unit.
Implements iTexture.
| void clGLTexture::CommitChanges | ( | ) | [protected, virtual] |
If the attached image has changed then update the GL texture.
Implements iTexture.
| clGLTexture::FWD_EVENT_HANDLER | ( | Event_SURFACE_DETACHED | ) |
| clGLTexture::FWD_EVENT_HANDLER | ( | Event_SURFACE_ATTACHED | ) |
| sBitmapParams clGLTexture::GetBitmapFormat | ( | ) | const [virtual] |
| Lenum clGLTexture::GetDataFormat | ( | const sBitmapParams & | Bitmap | ) | const [private] |
| void clGLTexture::GetTexImageCompressed | ( | Lubyte * | Image | ) | const [protected, virtual] |
| void clGLTexture::GetTexImageCompressedSizeAndInternalFormat | ( | Lint * | Size, |
| Lenum * | InternalFormat | ||
| ) | const [protected, virtual] |
| virtual Lenum clGLTexture::GetTextureTarget | ( | ) | const [inline, protected, virtual] |
| void clGLTexture::LoadFromBitmap | ( | clBitmap * | Bitmap | ) | [virtual] |
Reload current texture content from the bitmap.
Implements iTexture.
| void clGLTexture::SaveToBitmap | ( | clBitmap * | Bitmap | ) | const [virtual] |
Write current texture content to the bitmap.
Implements iTexture.
| void clGLTexture::SetClamping | ( | const LClamping | Clamping | ) | [virtual] |
Set clamping mode for the texture.
Implements iTexture.
| void clGLTexture::SetFormat | ( | Lenum | Target, |
| Lenum | InternalFormat, | ||
| Lenum | Format, | ||
| int | Width, | ||
| int | Height, | ||
| int | Depth | ||
| ) | [virtual] |
Set format of the texture's data.
Implements iTexture.
| void clGLTexture::SetImage | ( | clImage * | TheImage | ) | [virtual] |
| void clGLTexture::SetMipMapping | ( | const LMipMapping | MinFilter, |
| const LMipMapping | MagFilter | ||
| ) | [virtual] |
Set mipmapping modes for the texture.
Implements iTexture.
| void clGLTexture::SetupTexParameters | ( | ) | const [private] |
| void clGLTexture::TexImage | ( | Lenum | InternalFormat, |
| Luint | Width, | ||
| Luint | Height, | ||
| Luint | Depth, | ||
| Lenum | Format, | ||
| Lenum | DataType, | ||
| const Lubyte * | RawPixelData | ||
| ) | [protected, virtual] |
| void clGLTexture::TexImageCompressed | ( | Lenum | InternalFormat, |
| Luint | Width, | ||
| Luint | Height, | ||
| Luint | Depth, | ||
| Luint | CompressedSize, | ||
| const Lubyte * | RawPixelData | ||
| ) | [protected, virtual] |
| void clGLTexture::TexSubImage | ( | Luint | Level, |
| Lint | OffsetX, | ||
| Lint | OffsetY, | ||
| Luint | Width, | ||
| Luint | Height, | ||
| Luint | Depth, | ||
| Lenum | Format, | ||
| Lenum | DataType, | ||
| const Lubyte * | RawPixelData | ||
| ) | [protected, virtual] |
| void clGLTexture::UpdateFromBitmap | ( | clBitmap * | Bitmap | ) | [virtual] |
Update current texture content from the bitmap. Bitmap should have the same format as was previosly set with LoadFromBitmap(). Fast uploads are possible.
Reimplemented from iTexture.
| void clGLTexture::UpdateMipmaps | ( | ) | [virtual] |
Regenerate mipmaps. Useful to update the texture dynamicaly.
Implements iTexture.
| void clGLTexture::UpdateSubImageFromBitmap | ( | clBitmap * | Bitmap, |
| int | X, | ||
| int | Y, | ||
| int | MIPLevel | ||
| ) | [virtual] |
Update part of the current texture from the bitmap Bitmap should have the same format as was previosly set with LoadFromBitmap(). Fast uploads are possible.
Implements iTexture.
bool clGLTexture::FAttachedToFBO [private] |
Lenum clGLTexture::FClamping [private] |
bool clGLTexture::FCompressed [private] |
Lenum clGLTexture::FFormat [private] |
Lenum clGLTexture::FInternalFormat [private] |
Lenum clGLTexture::FMagFilter [private] |
Lenum clGLTexture::FMinFilter [private] |
Luint clGLTexture::FPBO [private] |
Luint clGLTexture::FTexID [private] |
clCVar* clGLTexture::FTextureRebinds [private] |
stats
Lenum clGLTexture::FTextureTarget [private] |