26#ifndef _CEGUIDirect3D11Renderer_h_
27#define _CEGUIDirect3D11Renderer_h_
29#include "../../Renderer.h"
30#include "../../Size.h"
31#include "../../Vector.h"
35#if (defined( __WIN32__ ) || defined( _WIN32 )) && !defined(CEGUI_STATIC)
36# ifdef CEGUIDIRECT3D11RENDERER_EXPORTS
37# define D3D11_GUIRENDERER_API __declspec(dllexport)
39# define D3D11_GUIRENDERER_API __declspec(dllimport)
42# define D3D11_GUIRENDERER_API
47# pragma warning(disable : 4251)
52struct ID3D11DeviceContext;
54struct ID3DX11EffectTechnique;
55struct ID3D11InputLayout;
56struct ID3DX11EffectShaderResourceVariable;
57struct ID3DX11EffectMatrixVariable;
58struct ID3D11ShaderResourceView;
82class Direct3D11GeometryBuffer;
83class Direct3D11Texture;
115 ID3D11DeviceContext* context,
116 const int abi = CEGUI_VERSION_ABI);
140 const int abi = CEGUI_VERSION_ABI);
197 const String& resourceGroup);
Renderer implementation using Direct3D 10.
Definition RendererModules/Direct3D11/Renderer.h:88
IDevice11 d_device
The D3D device we're using to render with.
Definition RendererModules/Direct3D11/Renderer.h:233
void endRendering()
Perform any operations required to finalise rendering.
ID3DX11EffectMatrixVariable * d_worldMatrixVariable
Variable to access world matrix used in geometry transformation.
Definition RendererModules/Direct3D11/Renderer.h:269
Direct3D11Renderer(ID3D11Device *device, ID3D11DeviceContext *context)
constructor
Texture & createTexture(const String &name, const Sizef &size)
Create a Texture object with the given pixel dimensions as specified by size.
TextureTargetList d_textureTargets
Container used to track texture targets.
Definition RendererModules/Direct3D11/Renderer.h:244
void setProjectionMatrix(D3DXMATRIX &matrix)
low-level function to set the projection matrix to be used.
GeometryBufferList d_geometryBuffers
Container used to track geometry buffers.
Definition RendererModules/Direct3D11/Renderer.h:248
static Direct3D11Renderer & create(ID3D11Device *device, ID3D11DeviceContext *context, const int abi=CEGUI_VERSION_ABI)
Create an Direct3D11Renderer object.
ID3DX11EffectTechnique * d_normalClippedTechnique
Rendering technique that supplies scissor clipped BM_NORMAL type rendering.
Definition RendererModules/Direct3D11/Renderer.h:257
static void destroySystem()
Convenience function to cleanup the CEGUI system and related objects that were created by calling the...
void destroyAllGeometryBuffers()
Destroy all GeometryBuffer objects created by this Renderer.
bool isTextureDefined(const String &name) const
Return whether a texture with the given name exists.
Texture & createTexture(const String &name)
Create a 'null' Texture object.
void destroyAllTextureTargets()
Destory all TextureTarget objects created by this Renderer.
std::vector< TextureTarget * > TextureTargetList
container type used to hold TextureTargets we create.
Definition RendererModules/Direct3D11/Renderer.h:242
Sizef getViewportSize()
return size of the D3D device viewport.
Texture & createTexture(const String &name, const String &filename, const String &resourceGroup)
Create a Texture object using the given image file.
RenderTarget * d_defaultTarget
The default RenderTarget.
Definition RendererModules/Direct3D11/Renderer.h:240
ID3DX11EffectMatrixVariable * d_projectionMatrixVariable
Variable to access projection matrix used in geometry transformation.
Definition RendererModules/Direct3D11/Renderer.h:271
TextureMap d_textures
Container used to track textures.
Definition RendererModules/Direct3D11/Renderer.h:253
bool isTexCoordSystemFlipped() const
Returns if the texture coordinate system is vertically flipped or not. The original of a texture coor...
Definition RendererModules/Direct3D11/Renderer.h:175
const Sizef & getDisplaySize() const
Return the size of the display or host window in pixels.
ID3DX11Effect * d_effect
Effect (shader) used when rendering.
Definition RendererModules/Direct3D11/Renderer.h:255
void setDisplaySize(const Sizef &sz)
Set the size of the display or host window in pixels for this Renderer object.
void setWorldMatrix(D3DXMATRIX &matrix)
low-level function to set the world matrix to be used.
Vector2f d_displayDPI
What the renderer considers to be the current display DPI resolution.
Definition RendererModules/Direct3D11/Renderer.h:238
ID3DX11EffectTechnique * d_premultipliedUnclippedTechnique
Rendering technique that supplies BM_RTT_PREMULTIPLIED type rendering.
Definition RendererModules/Direct3D11/Renderer.h:263
void destroyGeometryBuffer(const GeometryBuffer &buffer)
Destroy a GeometryBuffer that was returned when calling the createGeometryBuffer function....
static void destroy(Direct3D11Renderer &renderer)
Destroy an Direct3D11Renderer object.
uint getMaxTextureSize() const
Return the pixel size of the maximum supported texture.
void bindTechniquePass(const BlendMode mode, const bool clipped)
low-level function that binds the technique pass ready for use
void destroyTextureTarget(TextureTarget *target)
Function that cleans up TextureTarget objects created with the createTextureTarget function.
TextureTarget * createTextureTarget()
Create a TextureTarget that can be used to cache imagery; this is a RenderTarget that does not lose i...
RenderTarget & getDefaultRenderTarget()
Returns the default RenderTarget object. The default render target is is typically one that targets t...
ID3D11InputLayout * d_inputLayout
D3D11 input layout describing the vertex format we use.
Definition RendererModules/Direct3D11/Renderer.h:265
static void logTextureCreation(const String &name)
helper to safely log the creation of a named texture
Texture & getTexture(const String &name) const
Return a Texture object that was previously created by calling the createTexture functions.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
ID3DX11EffectTechnique * d_premultipliedClippedTechnique
Rendering technique that supplies scissor clipped BM_RTT_PREMULTIPLIED type rendering.
Definition RendererModules/Direct3D11/Renderer.h:261
void beginRendering()
Perform any operations required to put the system into a state ready for rendering operations to begi...
void setCurrentTextureShaderResource(ID3D11ShaderResourceView *srv)
low-level function to set the texture shader resource view to be used.
void destroyTexture(const String &name)
Destroy a Texture object that was previously created by calling the createTexture functions.
ID3DX11EffectTechnique * d_normalUnclippedTechnique
Rendering technique that supplies BM_NORMAL type rendering.
Definition RendererModules/Direct3D11/Renderer.h:259
const Vector2f & getDisplayDPI() const
Return the resolution of the display or host window in dots per inch.
const String & getIdentifierString() const
Return identification string for the renderer module.
ID3DX11EffectShaderResourceVariable * d_boundTextureVariable
Variable to access current texture (actually shader resource view)
Definition RendererModules/Direct3D11/Renderer.h:267
static String d_rendererID
String holding the renderer identification text.
Definition RendererModules/Direct3D11/Renderer.h:230
void throwIfNameExists(const String &name) const
helper to throw exception if name is already used.
Sizef d_displaySize
What the renderer considers to be the current display size.
Definition RendererModules/Direct3D11/Renderer.h:236
void destroyAllTextures()
Destroy all Texture objects created by this Renderer.
static void logTextureDestruction(const String &name)
helper to safely log the destruction of a named texture
~Direct3D11Renderer()
destructor.
static Direct3D11Renderer & bootstrapSystem(ID3D11Device *device, ID3D11DeviceContext *context, const int abi=CEGUI_VERSION_ABI)
Convenience function that creates the required objects to initialise the CEGUI system.
std::map< String, Direct3D11Texture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, Direct3D11Texture *)> TextureMap
container type used to hold Textures we create.
Definition RendererModules/Direct3D11/Renderer.h:251
std::vector< Direct3D11GeometryBuffer * > GeometryBufferList
container type used to hold GeometryBuffers we create.
Definition RendererModules/Direct3D11/Renderer.h:246
GeometryBuffer & createGeometryBuffer()
Create a new GeometryBuffer and return a reference to it. You should remove the GeometryBuffer from a...
Texture implementation for the Direct3D11Renderer.
Definition RendererModules/Direct3D11/Texture.h:50
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition GeometryBuffer.h:44
Defines interface to some surface that can be rendered to. Concrete instances of objects that impleme...
Definition RenderTarget.h:60
Abstract class defining the basic required interface for Renderer objects.
Definition Renderer.h:84
String class used within the GUI system.
Definition String.h:64
Specialisation of RenderTarget interface that should be used as the base class for RenderTargets that...
Definition TextureTarget.h:41
Abstract base class specifying the required interface for Texture objects.
Definition Texture.h:54
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1
BlendMode
Enumerated type that contains the valid options that specify the type of blending that is to be perfo...
Definition Renderer.h:62
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
Definition RendererModules/Direct3D11/Renderer.h:72
ID3D11DeviceContext * d_context
The D3D device context we're using to render.
Definition RendererModules/Direct3D11/Renderer.h:76
ID3D11Device * d_device
The D3D device context we're using to create various resources with.
Definition RendererModules/Direct3D11/Renderer.h:74