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)
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,
109 void blitFromMemory(
const void* sourceData,
const Rectf& area);
110 void blitToMemory(
void* targetData);
111 bool isPixelFormatSupported(
const PixelFormat fmt)
const;
132 GLuint tex,
const Sizef& size);
137 void generateOpenGLTexture();
140 void updateCachedScaleValues();
143 void cleanupOpenGLTexture();
146 void initInternalPixelFormatFields(
const PixelFormat fmt);
149 void setTextureSize_impl(
const Sizef& sz);
151 void loadUncompressedTextureBuffer(
const Rectf& dest_area,
152 const GLvoid* buffer)
const;
154 void loadCompressedTextureBuffer(
const Rectf& dest_area,
155 const GLvoid* buffer)
const;
157 GLsizei getCompressedTextureSize(
const Sizef& pixel_size)
const;
183 #if defined(_MSC_VER)
184 # pragma warning(pop)
187 #endif // end of guard _CEGUIOpenGLTexture_h_