Crazy Eddie's GUI System
0.8.7
|
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);
112 const int abi = CEGUI_VERSION_ABI);
163 const bool force =
false);
176 const String& resourceGroup);
199 void throwIfNameExists(
const String& name)
const;
201 static void logTextureCreation(
const String& name);
203 static void logTextureDestruction(
const String& name);
206 Sizef getViewportSize();
208 float getSizeNextPOT(
float sz)
const;
211 static String d_rendererID;
213 LPDIRECT3DDEVICE9 d_device;
221 typedef std::vector<TextureTarget*> TextureTargetList;
223 TextureTargetList d_textureTargets;
225 typedef std::vector<Direct3D9GeometryBuffer*> GeometryBufferList;
227 GeometryBufferList d_geometryBuffers;
232 TextureMap d_textures;
234 uint d_maxTextureSize;
236 bool d_supportNPOTTex;
238 bool d_supportNonSquareTex;
245 #if defined(_MSC_VER)
246 # pragma warning(pop)
249 #endif // end of guard _CEGUIDirect3D9Renderer_h_
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: GeometryBuffer.h:44
Texture & createTexture(const String &name)
Create a 'null' Texture object.
TextureTarget * createTextureTarget()
Create a TextureTarget that can be used to cache imagery; this is a RenderTarget that does not lose i...
static void destroySystem()
Convenience function to cleanup the CEGUI system and related objects that were created by calling the...
void destroyAllTextures()
Destroy all Texture objects created by this Renderer.
void beginRendering()
Perform any operations required to put the system into a state ready for rendering operations to begi...
Functor that can be used as comparator in a std::map with String keys. It's faster than using the def...
Definition: String.h:5580
void destroyTexture(const String &name)
Destroy a Texture object that was previously created by calling the createTexture functions.
bool supportsNPOTTextures()
return true if we can use NPOT texture dimensions.
Texture & createTexture(const String &name, LPDIRECT3DTEXTURE9 tex)
create a CEGUI::texture from an existing D3D texture
bool isTextureDefined(const String &name) const
Return whether a texture with the given name exists.
Texture & createTexture(const String &name, const Sizef &size)
Create a Texture object with the given pixel dimensions as specified by size.
GeometryBuffer & createGeometryBuffer()
Create a new GeometryBuffer and return a reference to it. You should remove the GeometryBuffer from a...
void postD3DReset()
support function to be called after a Reset on the Direct3DDevice9.
const Sizef & getDisplaySize() const
Return the size of the display or host window in pixels.
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void destroyAllTextureTargets()
Destory all TextureTarget objects created by this Renderer.
void preD3DReset()
support function to be called prior to a Reset on the Direct3DDevice9.
void destroyAllGeometryBuffers()
Destroy all GeometryBuffer objects created by this Renderer.
static void destroy(Direct3D9Renderer &renderer)
Destroy an Direct3D9Renderer object.
bool supportsNonSquareTexture()
return true if we can use non square textures.
static Direct3D9Renderer & bootstrapSystem(LPDIRECT3DDEVICE9 device, const int abi=CEGUI_VERSION_ABI)
Convenience function that creates the required objects to initialise the CEGUI system.
void endRendering()
Perform any operations required to finalise rendering.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
static Direct3D9Renderer & create(LPDIRECT3DDEVICE9 device, const int abi=CEGUI_VERSION_ABI)
Create an Direct3D9Renderer object.
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
void destroyGeometryBuffer(const GeometryBuffer &buffer)
Destroy a GeometryBuffer that was returned when calling the createGeometryBuffer function....
uint getMaxTextureSize() const
Return the pixel size of the maximum supported texture.
Texture implementation for the Direct3D9Renderer.
Definition: RendererModules/Direct3D9/Texture.h:45
void setupRenderingBlendMode(const BlendMode mode, const bool force=false)
set the render states for the specified BlendMode.
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition: Renderer.h:62
void setDisplaySize(const Sizef &sz)
Set the size of the display or host window in pixels for this Renderer object.
void destroyTextureTarget(TextureTarget *target)
Function that cleans up TextureTarget objects created with the createTextureTarget function.
LPDIRECT3DDEVICE9 getDevice() const
return the Direct3D 9 Device interface used by this renderer object.
const Vector2f & getDisplayDPI() const
Return the resolution of the display or host window in dots per inch.
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition: RenderTarget.h:60
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition: TextureTarget.h:41
Sizef getAdjustedSize(const Sizef &sz)
returns Size object from sz adjusted for hardware capabilities.
String class used within the GUI system.
Definition: String.h:64
Texture & getTexture(const String &name) const
Return a Texture object that was previously created by calling the createTexture functions.
const String & getIdentifierString() const
Return identification string for the renderer module.
Renderer class to interface with Direct3D 9.
Definition: RendererModules/Direct3D9/Renderer.h:65
Abstract class defining the basic required interface for Renderer objects.
Definition: Renderer.h:84
Texture & createTexture(const String &name, const String &filename, const String &resourceGroup)
Create a Texture object using the given image file.
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition: RendererModules/Direct3D9/Renderer.h:138
RenderTarget & getDefaultRenderTarget()
Returns the default RenderTarget object. The default render target is is typically one that targets t...