Crazy Eddie's GUI System
0.8.7
|
27 #ifndef _CEGUIOpenGLTexture_h_
28 #define _CEGUIOpenGLTexture_h_
30 #include "../../Base.h"
31 #include "../../Renderer.h"
32 #include "../../Texture.h"
33 #include "CEGUI/RendererModules/OpenGL/RendererBase.h"
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
132 GLuint tex,
const Sizef& size);
145 GLint internalFormat()
const;
153 void loadUncompressedTextureBuffer(
const Rectf& dest_area,
154 const GLvoid* buffer)
const;
156 void loadCompressedTextureBuffer(
const Rectf& dest_area,
157 const GLvoid* buffer)
const;
159 GLsizei getCompressedTextureSize(
const Sizef& pixel_size)
const;
185 #if defined(_MSC_VER)
186 # pragma warning(pop)
189 #endif // end of guard _CEGUIOpenGLTexture_h_
GLenum d_subpixelFormat
Texture subpixel format.
Definition: RendererModules/OpenGL/Texture.h:178
void blitToMemory(void *targetData)
Performs a complete blit from the texture surface to memory.
void restoreTexture()
Restore the texture from the locally buffered copy previously create by a call to grabTexture.
void initInternalPixelFormatFields(const PixelFormat fmt)
initialise the internal format flags for the given CEGUI::PixelFormat.
virtual ~OpenGLTexture()
Destructor.
GLuint d_ogltexture
The OpenGL texture we're wrapping.
Definition: RendererModules/OpenGL/Texture.h:162
uint8 * d_grabBuffer
cached image data for restoring the texture.
Definition: RendererModules/OpenGL/Texture.h:166
GLenum d_format
Texture format.
Definition: RendererModules/OpenGL/Texture.h:176
Texture & createTexture(const String &name)
Create a 'null' Texture object.
const Vector2f & getTexelScaling() const
Returns pixel to texel scale values that should be used for converting pixel values to texture co-ord...
void updateCachedScaleValues()
updates cached scale value used to map pixels to texture co-ords.
void setTextureSize(const Sizef &sz)
set the size of the internal texture.
void loadFromMemory(const void *buffer, const Sizef &buffer_size, PixelFormat pixel_format)
Loads (copies) an image in memory into the texture. The texture is resized as required to hold the im...
Sizef d_size
Size of the texture.
Definition: RendererModules/OpenGL/Texture.h:164
void blitFromMemory(const void *sourceData, const Rectf &area)
Performs an area memory blit to the texture.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Texture implementation for the OpenGLRenderer.
Definition: RendererModules/OpenGL/Texture.h:45
OpenGLTexture(OpenGLRendererBase &owner, const String &name)
Basic constructor.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
void grabTexture()
Grab the texture to a local buffer.
const String d_name
The name given for this texture.
Definition: RendererModules/OpenGL/Texture.h:174
void cleanupOpenGLTexture()
clean up the GL texture, or the grab buffer if it had been grabbed
const Sizef & getOriginalDataSize() const
Returns the original pixel size of the data loaded into the texture.
Sizef d_dataSize
original size of pixel data loaded into texture
Definition: RendererModules/OpenGL/Texture.h:168
const String & getName() const
Returns the name given to the texture when it was created.
void generateOpenGLTexture()
generate the OpenGL texture and set some initial options.
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
void setOpenGLTexture(GLuint tex, const Sizef &size)
set the openGL texture that this Texture is based on to the specified texture, with the specified siz...
OpenGLTexture(OpenGLRendererBase &owner, const String &name, const String &filename, const String &resourceGroup)
Constructor that creates a Texture from an image file.
void setTextureSize_impl(const Sizef &sz)
internal texture resize function (does not reset format or other fields)
GLuint getOpenGLTexture() const
Return the internal OpenGL texture id used by this Texture object.
OpenGLRendererBase & d_owner
OpenGLRenderer that created and owns this OpenGLTexture.
Definition: RendererModules/OpenGL/Texture.h:172
bool isPixelFormatSupported(const PixelFormat fmt) const
Return whether the specified pixel format is supported by the system for the CEGUI::Texture implement...
String class used within the GUI system.
Definition: String.h:64
void loadFromFile(const String &filename, const String &resourceGroup)
Loads the specified image file into the texture. The texture is resized as required to hold the image...
PixelFormat
Enumerated type containing the supported pixel formats that can be passed to loadFromMemory.
Definition: Texture.h:62
OpenGLTexture(OpenGLRendererBase &owner, const String &name, GLuint tex, const Sizef &size)
Constructor that wraps an existing GL texture.
const Sizef & getSize() const
Returns the current pixel size of the texture.
bool d_isCompressed
Whether Texture format is a compressed format.
Definition: RendererModules/OpenGL/Texture.h:180
OpenGLTexture(OpenGLRendererBase &owner, const String &name, const Sizef &size)
Constructor that creates a Texture with a given size.
Common base class used for other OpenGL (desktop or ES) based renderer modules.
Definition: RendererBase.h:54
Vector2f d_texelScaling
cached pixel to texel mapping scale values.
Definition: RendererModules/OpenGL/Texture.h:170