Linderdaum Engine: clGLTexture Class Reference
Updated: Sun Feb 5 2012 22:59:50
clGLTexture Class Reference

#include <GLTexture.h>

List of all members.

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
clCVarFTextureRebinds
 stats

Constructor & Destructor Documentation

clGLTexture::clGLTexture ( )
clGLTexture::~clGLTexture ( ) [virtual]

Member Function Documentation

void clGLTexture::AfterConstruction ( ) [virtual]

Reimplemented from iObject.

void clGLTexture::AttachToCurrentFB ( Lenum  Attachment,
int  ZSlice 
) [virtual]

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]

Get format for clBitmap.

Implements iTexture.

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]

Read texture image from TheImage.

Change texture type

Reimplemented from iTexture.

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.


Member Data Documentation

bool clGLTexture::FCompressed [private]

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