28 #ifndef _CEGUIDirect3D9Renderer_h_
29 #define _CEGUIDirect3D9Renderer_h_
31 #include "../../CEGUIBase.h"
32 #include "../../CEGUIRenderer.h"
33 #include "../../CEGUISize.h"
34 #include "../../CEGUIVector.h"
39 #if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
40 # ifdef DIRECT3D9_GUIRENDERER_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;
101 static void destroySystem();
125 LPDIRECT3DDEVICE9 getDevice()
const;
128 Texture& createTexture(LPDIRECT3DTEXTURE9 tex);
131 bool supportsNonSquareTexture();
134 bool supportsNPOTTextures();
137 Size getAdjustedSize(
const Size& sz);
140 void setupRenderingBlendMode(
const BlendMode mode,
141 const bool force =
false);
147 void destroyAllGeometryBuffers();
150 void destroyAllTextureTargets();
154 void destroyTexture(
Texture& texture);
155 void destroyAllTextures();
156 void beginRendering();
158 void setDisplaySize(
const Size& sz);
159 const Size& getDisplaySize()
const;
160 const Vector2& getDisplayDPI()
const;
161 uint getMaxTextureSize()
const;
162 const String& getIdentifierString()
const;
172 Size getViewportSize();
174 float getSizeNextPOT(
float sz)
const;
177 static String d_rendererID;
179 LPDIRECT3DDEVICE9 d_device;
189 typedef std::vector<TextureTarget*> TextureTargetList;
191 TextureTargetList d_textureTargets;
193 typedef std::vector<Direct3D9GeometryBuffer*> GeometryBufferList;
195 GeometryBufferList d_geometryBuffers;
197 typedef std::vector<Direct3D9Texture*> TextureList;
199 TextureList d_textures;
201 uint d_maxTextureSize;
203 bool d_supportNPOTTex;
205 bool d_supportNonSquareTex;
212 #if defined(_MSC_VER)
213 # pragma warning(pop)
216 #endif // end of guard _CEGUIDirect3D9Renderer_h_