28 #ifndef _CEGUIDirect3D9Renderer_h_
29 #define _CEGUIDirect3D9Renderer_h_
31 #include "../../Base.h"
32 #include "../../Renderer.h"
33 #include "../../Size.h"
34 #include "../../Vector.h"
40 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
41 # ifdef CEGUIDIRECT3D9RENDERER_EXPORTS
42 # define DIRECT3D9_GUIRENDERER_API __declspec(dllexport)
44 # define DIRECT3D9_GUIRENDERER_API __declspec(dllimport)
47 # define DIRECT3D9_GUIRENDERER_API
51 # pragma warning(push)
52 # pragma warning(disable : 4251)
58 class Direct3D9Texture;
59 class Direct3D9GeometryBuffer;
89 const int abi = CEGUI_VERSION_ABI);
106 static void destroySystem();
113 const int abi = CEGUI_VERSION_ABI);
131 LPDIRECT3DDEVICE9 getDevice()
const;
134 Texture& createTexture(
const String& name, LPDIRECT3DTEXTURE9 tex);
137 bool supportsNonSquareTexture();
140 bool supportsNPOTTextures();
146 void setupRenderingBlendMode(
const BlendMode mode,
147 const bool force =
false);
153 void destroyAllGeometryBuffers();
156 void destroyAllTextureTargets();
160 const String& resourceGroup);
162 void destroyTexture(
Texture& texture);
163 void destroyTexture(
const String& name);
164 void destroyAllTextures();
166 bool isTextureDefined(
const String& name)
const;
167 void beginRendering();
169 void setDisplaySize(
const Sizef& sz);
170 const Sizef& getDisplaySize()
const;
171 const Vector2f& getDisplayDPI()
const;
172 uint getMaxTextureSize()
const;
173 const String& getIdentifierString()
const;
183 void throwIfNameExists(
const String& name)
const;
185 static void logTextureCreation(
const String& name);
187 static void logTextureDestruction(
const String& name);
190 Sizef getViewportSize();
192 float getSizeNextPOT(
float sz)
const;
195 static String d_rendererID;
197 LPDIRECT3DDEVICE9 d_device;
205 typedef std::vector<TextureTarget*> TextureTargetList;
207 TextureTargetList d_textureTargets;
209 typedef std::vector<Direct3D9GeometryBuffer*> GeometryBufferList;
211 GeometryBufferList d_geometryBuffers;
216 TextureMap d_textures;
218 uint d_maxTextureSize;
220 bool d_supportNPOTTex;
222 bool d_supportNonSquareTex;
229 #if defined(_MSC_VER)
230 # pragma warning(pop)
233 #endif // end of guard _CEGUIDirect3D9Renderer_h_