#include <freecloth/gfx/gfxGLTexture.h>
Inheritance diagram for GfxGLTexture:


Public Types | |
| typedef RCShdPtr< GfxImage > | ImagePtr |
Public Methods | |
| GfxGLTexture (const ImagePtr &image, Int32 format) | |
| virtual | ~GfxGLTexture () |
| UInt32 | getTextureId () const |
| GePoint | getCorner () const |
| Get position of top-right corner of image in texture co-ordinates. If the input image is a large enough power-of-2 size, this will always be (1,1). Otherwise, the image is padded with zeros to a power-of-2 size, and the top-right corner will have a (u,v) position somewhere between (.5,.5) and (1,1). | |
| void | bind () const |
| void | generateMipmaps () |
| UInt32 | getOriginalWidth () const |
| Get width of texture image prior to power-of-2 related padding. | |
| UInt32 | getOriginalHeight () const |
| Get height of texture image prior to power-of-2 related padding. | |
| Float | getOriginalAspectRatio () const |
| Get aspect ratio prior to power-of-2 related padding. | |
| const GfxImage & | getImage () const |
| Get actual image used for texture. | |
Static Public Methods | |
| RCShdPtr< GfxImage > | makePow2 (const GfxImage &) |
| Embeds input image in a larger image whose size is a power of two. Keep in mind that texture co-ordinates need to take into account the new image size. | |
Private Methods | |
| GfxGLTexture (const GfxGLTexture &) | |
| Disallowed. | |
| GfxGLTexture & | operator= (const GfxGLTexture &) |
| Disallowed. | |
Private Attributes | |
| ImagePtr | _image |
| UInt32 | _textureId |
| Int32 | _format |
| UInt32 | _originalWidth |
| UInt32 | _originalHeight |
Image is padded to a power-of-2 size, as required by OpenGL.
Definition at line 50 of file gfxGLTexture.h.
1.2.14 written by Dimitri van Heesch,
© 1997-2002