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;
89 LPDIRECT3DDEVICE9 getDevice()
const;
92 Texture& createTexture(LPDIRECT3DTEXTURE9 tex);
95 bool supportsNonSquareTexture();
98 bool supportsNPOTTextures();
101 Size getAdjustedSize(
const Size& sz);
107 void destroyAllGeometryBuffers();
110 void destroyAllTextureTargets();
114 void destroyTexture(
Texture& texture);
115 void destroyAllTextures();
116 void beginRendering();
118 void setDisplaySize(
const Size& sz);
119 const Size& getDisplaySize()
const;
120 const Vector2& getDisplayDPI()
const;
121 uint getMaxTextureSize()
const;
122 const String& getIdentifierString()
const;
132 Size getViewportSize();
134 float getSizeNextPOT(
float sz)
const;
137 static String d_rendererID;
139 LPDIRECT3DDEVICE9 d_device;
149 typedef std::vector<TextureTarget*> TextureTargetList;
151 TextureTargetList d_textureTargets;
153 typedef std::vector<Direct3D9GeometryBuffer*> GeometryBufferList;
155 GeometryBufferList d_geometryBuffers;
157 typedef std::vector<Direct3D9Texture*> TextureList;
159 TextureList d_textures;
161 uint d_maxTextureSize;
163 bool d_supportNPOTTex;
165 bool d_supportNonSquareTex;
170 #if defined(_MSC_VER)
171 # pragma warning(pop)
174 #endif // end of guard _CEGUIDirect3D9Renderer_h_