28 #ifndef _CEGUIOpenGLESRenderer_h_
29 #define _CEGUIOpenGLESRenderer_h_
31 #include "CEGUI/Base.h"
32 #include "CEGUI/Renderer.h"
33 #include "CEGUI/Size.h"
34 #include "CEGUI/Vector.h"
35 #include "CEGUI/RendererModules/OpenGLES/GLES.h"
39 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
40 # ifdef CEGUIOPENGLESRENDERER_EXPORTS
41 # define OPENGLES_GUIRENDERER_API __declspec(dllexport)
43 # define OPENGLES_GUIRENDERER_API __declspec(dllimport)
46 # define OPENGLES_GUIRENDERER_API
50 # pragma warning(push)
51 # pragma warning(disable : 4251)
58 class OpenGLESTexture;
59 class OpenGLESTextureTarget;
60 class OpenGLESGeometryBuffer;
61 class OGLTextureTargetFactory;
107 const TextureTargetType tt_type = TTT_AUTO,
108 const int abi = CEGUI_VERSION_ABI);
137 const Sizef& display_size,
138 const TextureTargetType tt_type = TTT_AUTO,
139 const int abi = CEGUI_VERSION_ABI);
156 static void destroySystem();
170 const int abi = CEGUI_VERSION_ABI);
187 const TextureTargetType tt_type = TTT_AUTO,
188 const int abi = CEGUI_VERSION_ABI);
207 static bool isGLExtensionSupported(
const char* extension );
213 void destroyAllGeometryBuffers();
216 void destroyAllTextureTargets();
220 const String& resourceGroup);
222 void destroyTexture(
Texture& texture);
223 void destroyTexture(
const String& name);
224 void destroyAllTextures();
226 bool isTextureDefined(
const String& name)
const;
227 void beginRendering();
229 void setDisplaySize(
const Sizef& sz);
230 const Sizef& getDisplaySize()
const;
231 const Vector2f& getDisplayDPI()
const;
232 uint getMaxTextureSize()
const;
233 const String& getIdentifierString()
const;
262 void enableExtraStateSettings(
bool setting);
278 void restoreTextures();
291 Sizef getAdjustedTextureSize(
const Sizef& sz)
const;
298 static float getNextPOTSize(
const float f);
331 void setupExtraStates();
334 void cleanupExtraStates();
337 void initialiseTextureTargetFactory(
const TextureTargetType tt_type);
340 void logTextureDestruction(
const String& name);
345 GLboolean glScissorTest;
354 static String d_rendererID;
358 Vector2f d_displayDPI;
360 RenderTarget* d_defaultTarget;
362 typedef std::vector<TextureTarget*> TextureTargetList;
364 TextureTargetList d_textureTargets;
366 typedef std::vector<OpenGLESGeometryBuffer*> GeometryBufferList;
368 GeometryBufferList d_geometryBuffers;
370 typedef std::map<String, OpenGLESTexture*, StringFastLessCompare
371 CEGUI_MAP_ALLOC(String, OpenGLESTexture*)> TextureMap;
373 TextureMap d_textures;
375 uint d_maxTextureSize;
377 bool d_initExtraStates;
379 OGLTextureTargetFactory* d_textureTargetFactory;
384 #if defined(_MSC_VER)
385 # pragma warning(pop)
388 #endif // end of guard _CEGUIOpenGLESRenderer_h_