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) 44 class OPENGL_GUIRENDERER_API OpenGLTexture :
public Texture
52 void setOpenGLTexture(GLuint tex,
const Sizef& size);
61 GLuint getOpenGLTexture()
const;
83 void setTextureSize(
const Sizef& sz);
99 void restoreTexture();
102 const String& getName()
const;
103 const Sizef& getSize()
const;
104 const Sizef& getOriginalDataSize()
const;
105 const Vector2f& getTexelScaling()
const;
106 void loadFromFile(
const String& filename,
const String& resourceGroup);
107 void loadFromMemory(
const void* buffer,
const Sizef& buffer_size,
108 PixelFormat pixel_format);
109 void blitFromMemory(
const void* sourceData,
const Rectf& area);
110 void blitToMemory(
void* targetData);
111 bool isPixelFormatSupported(
const PixelFormat fmt)
const;
123 OpenGLTexture(OpenGLRendererBase& owner,
const String& name);
125 OpenGLTexture(OpenGLRendererBase& owner,
const String& name,
126 const String& filename,
const String& resourceGroup);
128 OpenGLTexture(OpenGLRendererBase& owner,
const String& name,
131 OpenGLTexture(OpenGLRendererBase& owner,
const String& name,
132 GLuint tex,
const Sizef& size);
134 virtual ~OpenGLTexture();
137 void generateOpenGLTexture();
140 void updateCachedScaleValues();
143 void cleanupOpenGLTexture();
145 GLint internalFormat()
const;
148 void initInternalPixelFormatFields(
const PixelFormat fmt);
151 void setTextureSize_impl(
const Sizef& sz);
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;
170 Vector2f d_texelScaling;
172 OpenGLRendererBase& d_owner;
178 GLenum d_subpixelFormat;
185 #if defined(_MSC_VER) 186 # pragma warning(pop) 189 #endif // end of guard _CEGUIOpenGLTexture_h_ void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions...
Definition: RendererBase.cpp:274
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
Texture & createTexture(const String &name)
Create a 'null' Texture object.
Definition: RendererBase.cpp:219