28 #ifndef _CEGUIOpenGLTexture_h_
29 #define _CEGUIOpenGLTexture_h_
31 #include "../../Base.h"
32 #include "../../Renderer.h"
33 #include "../../Texture.h"
34 #include "CEGUI/RendererModules/OpenGL/RendererBase.h"
37 # pragma warning(push)
38 # pragma warning(disable : 4251)
53 void setOpenGLTexture(GLuint tex,
const Sizef& size);
62 GLuint getOpenGLTexture()
const;
84 void setTextureSize(
const Sizef& sz);
100 void restoreTexture();
103 const String& getName()
const;
104 const Sizef& getSize()
const;
105 const Sizef& getOriginalDataSize()
const;
106 const Vector2f& getTexelScaling()
const;
107 void loadFromFile(
const String& filename,
const String& resourceGroup);
108 void loadFromMemory(
const void* buffer,
const Sizef& buffer_size,
110 void blitFromMemory(
const void* sourceData,
const Rectf& area);
111 void blitToMemory(
void* targetData);
112 bool isPixelFormatSupported(
const PixelFormat fmt)
const;
133 GLuint tex,
const Sizef& size);
138 void generateOpenGLTexture();
141 void updateCachedScaleValues();
144 void cleanupOpenGLTexture();
147 void initInternalPixelFormatFields(
const PixelFormat fmt);
150 void setTextureSize_impl(
const Sizef& sz);
152 void loadUncompressedTextureBuffer(
const Rectf& dest_area,
153 const GLvoid* buffer)
const;
155 void loadCompressedTextureBuffer(
const Rectf& dest_area,
156 const GLvoid* buffer)
const;
158 GLsizei getCompressedTextureSize(
const Sizef& pixel_size)
const;
184 #if defined(_MSC_VER)
185 # pragma warning(pop)
188 #endif // end of guard _CEGUIOpenGLTexture_h_