![]() |
omegalib
13.1
|
#include <Texture.h>
Public Types | |
| enum | TextureType { Type2D, TypeRectangle } |
| Texture types. More... | |
| enum | ChannelType { ChannelRGBA, ChannelRGB, ChannelDepth } |
| Channel types. More... | |
| enum | ChannelFormat { FormatUInt, FormatUByte, FormatFloat } |
| Channel format. More... | |
Public Member Functions | |
| void | initialize (int width, int height, TextureType tt=Type2D, ChannelType ct=ChannelRGBA, ChannelFormat cf=FormatUByte) |
| Initializes this texture object using a specific texture type, channel type and channel format. More... | |
| void | resize (int width, int height) |
| Resets the size of this texture without changing its format. More... | |
| bool | isInitialized () |
| void | writePixels (PixelData *data) |
| Write pixels from a PixelData object. More... | |
| void | readPixels (PixelData *data) |
| Write pixels to a PixelData object. More... | |
| void | writeRawPixels (const byte *data, int width, int height, uint format) |
| Write pixels from a memory buffer. More... | |
| int | getWidth () |
| int | getHeight () |
| TextureType | getTextureType () |
| ChannelType | getChannelType () |
| ChannelFormat | getChannelFormat () |
| virtual void | dispose () |
| GLuint | getGLTexture () |
| Texture operations. More... | |
| void | bind (GpuContext::TextureUnit unit) |
| void | unbind () |
| void | refresh () |
| bool | isBound () |
| GpuContext::TextureUnit | getTextureUnit () |
Public Member Functions inherited from omega::GpuResource | |
| GpuResource (GpuContext *ctx) | |
| GpuContext * | getContext () |
Public Member Functions inherited from omicron::ReferenceType | |
| ReferenceType () | |
| virtual | ~ReferenceType () |
| void | ref () |
| void | unref () |
| long | refCount () |
Static Public Member Functions | |
| static void | enablePboTransfers (bool value) |
Static Public Member Functions inherited from omicron::ReferenceType | |
| static void | printObjCounts () |
Protected Member Functions | |
| Texture (GpuContext *context) | |
Friends | |
| class | GpuContext |
Additional Inherited Members | |
Static Protected Attributes inherited from omicron::ReferenceType | |
| static List< ReferenceType * > | mysObjList |
Inheritance diagram for omega::Texture:Texture types.
| Enumerator | |
|---|---|
| Type2D | |
| TypeRectangle | |
|
protected |
| void omega::Texture::bind | ( | GpuContext::TextureUnit | unit | ) |
|
virtual |
Implements omega::GpuResource.
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| void omega::Texture::initialize | ( | int | width, |
| int | height, | ||
| TextureType | tt = Type2D, |
||
| ChannelType | ct = ChannelRGBA, |
||
| ChannelFormat | cf = FormatUByte |
||
| ) |
Initializes this texture object using a specific texture type, channel type and channel format.
|
inline |
|
inline |
| void omega::Texture::refresh | ( | ) |
| void omega::Texture::resize | ( | int | width, |
| int | height | ||
| ) |
Resets the size of this texture without changing its format.
| void omega::Texture::unbind | ( | ) |
Write pixels from a memory buffer.
| format | - a pixel format such as GL_RGB, GL_RGBA, etc. |
|
friend |