27 #ifndef _CEGUIDirect3D9Renderer_h_
28 #define _CEGUIDirect3D9Renderer_h_
30 #include "../../Base.h"
31 #include "../../Renderer.h"
32 #include "../../Size.h"
33 #include "../../Vector.h"
39 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
40 # ifdef CEGUIDIRECT3D9RENDERER_EXPORTS
41 # define DIRECT3D9_GUIRENDERER_API __declspec(dllexport)
43 # define DIRECT3D9_GUIRENDERER_API __declspec(dllimport)
46 # define DIRECT3D9_GUIRENDERER_API
50 # pragma warning(push)
51 # pragma warning(disable : 4251)
57 class Direct3D9Texture;
58 class Direct3D9GeometryBuffer;
88 const int abi = CEGUI_VERSION_ABI);
105 static void destroySystem();
112 const int abi = CEGUI_VERSION_ABI);
130 LPDIRECT3DDEVICE9 getDevice()
const;
133 Texture& createTexture(
const String& name, LPDIRECT3DTEXTURE9 tex);
136 bool supportsNonSquareTexture();
139 bool supportsNPOTTextures();
145 void setupRenderingBlendMode(
const BlendMode mode,
146 const bool force =
false);
152 void destroyAllGeometryBuffers();
155 void destroyAllTextureTargets();
159 const String& resourceGroup);
161 void destroyTexture(
Texture& texture);
162 void destroyTexture(
const String& name);
163 void destroyAllTextures();
165 bool isTextureDefined(
const String& name)
const;
166 void beginRendering();
168 void setDisplaySize(
const Sizef& sz);
169 const Sizef& getDisplaySize()
const;
170 const Vector2f& getDisplayDPI()
const;
171 uint getMaxTextureSize()
const;
172 const String& getIdentifierString()
const;
182 void throwIfNameExists(
const String& name)
const;
184 static void logTextureCreation(
const String& name);
186 static void logTextureDestruction(
const String& name);
189 Sizef getViewportSize();
191 float getSizeNextPOT(
float sz)
const;
194 static String d_rendererID;
196 LPDIRECT3DDEVICE9 d_device;
204 typedef std::vector<TextureTarget*> TextureTargetList;
206 TextureTargetList d_textureTargets;
208 typedef std::vector<Direct3D9GeometryBuffer*> GeometryBufferList;
210 GeometryBufferList d_geometryBuffers;
215 TextureMap d_textures;
217 uint d_maxTextureSize;
219 bool d_supportNPOTTex;
221 bool d_supportNonSquareTex;
228 #if defined(_MSC_VER)
229 # pragma warning(pop)
232 #endif // end of guard _CEGUIDirect3D9Renderer_h_