Crazy Eddie's GUI System
0.8.7
|
26 #ifndef _CEGUIDirect3D11Texture_h_
27 #define _CEGUIDirect3D11Texture_h_
29 #include "../../Texture.h"
30 #include "CEGUI/RendererModules/Direct3D11/Renderer.h"
31 #include "../../Size.h"
32 #include "../../Vector.h"
36 struct ID3D11DeviceContext;
37 struct ID3D11Texture2D;
38 struct ID3D11ShaderResourceView;
41 # pragma warning(push)
42 # pragma warning(disable : 4251)
114 const String& resourceGroup);
150 #if defined(_MSC_VER)
151 # pragma warning(pop)
154 #endif // end of guard _CEGUIDirect3D11Texture_h_
void loadFromMemory(const void *buffer, const Sizef &buffer_size, PixelFormat pixel_format)
Loads (copies) an image in memory into the texture. The texture is resized as required to hold the im...
Definition: RendererModules/Direct3D11/Renderer.h:67
virtual ~Direct3D11Texture()
Destructor.
void blitFromMemory(const void *sourceData, const Rectf &area)
Performs an area memory blit to the texture.
Direct3D11Texture(IDevice11 &device, const String &name)
Basic constructor.
ID3D11ShaderResourceView * getDirect3DShaderResourceView() const
Return the internal D3D10 shader resource view for the texture.
const String d_name
The name we were created with.
Definition: RendererModules/Direct3D11/Texture.h:144
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
void setOriginalDataSize(const Sizef &sz)
Sets what the texture should consider as the original data size.
const Sizef & getOriginalDataSize() const
Returns the original pixel size of the data loaded into the texture.
void blitToMemory(void *targetData)
Performs a complete blit from the texture surface to memory.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
Direct3D11Texture(IDevice11 &device, const String &name, ID3D11Texture2D *tex)
Construct texture that wraps an existing D3D10 texture.
ID3D11Texture2D * getDirect3DTexture() const
Return the internal D3D10 texture used by this Texture object.
const String & getName() const
Returns the name given to the texture when it was created.
void loadFromFile(const String &filename, const String &resourceGroup)
Loads the specified image file into the texture. The texture is resized as required to hold the image...
bool isPixelFormatSupported(const PixelFormat fmt) const
Return whether the specified pixel format is supported by the system for the CEGUI::Texture implement...
Direct3D11Texture(IDevice11 &device, const String &name, const String &filename, const String &resourceGroup)
Construct texture from an image file.
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
void updateCachedScaleValues()
updates cached scale value used to map pixels to texture co-ords.
ID3D11ShaderResourceView * d_resourceView
Shader resource view for the texture.
Definition: RendererModules/Direct3D11/Texture.h:136
Vector2f d_texelScaling
cached pixel to texel mapping scale values.
Definition: RendererModules/Direct3D11/Texture.h:142
void cleanupDirect3D11Texture()
clean up the internal texture.
void setDirect3DTexture(ID3D11Texture2D *tex)
set the D3D10 texture that this Texture is based on to the specified texture.
Texture & createTexture(const String &name)
Create a 'null' Texture object.
Direct3D11Texture(IDevice11 &device, const String &name, const Sizef &sz)
Construct texture with a given size.
void updateTextureSize()
set d_size to actual texture size (d_dataSize is used if query fails)
String class used within the GUI system.
Definition: String.h:64
const Vector2f & getTexelScaling() const
Returns pixel to texel scale values that should be used for converting pixel values to texture co-ord...
const Sizef & getSize() const
Returns the current pixel size of the texture.
ID3D11Texture2D * d_texture
The D3D 10 texture we're wrapping.
Definition: RendererModules/Direct3D11/Texture.h:134
IDevice11 & d_device
D3D device used to do the business.
Definition: RendererModules/Direct3D11/Texture.h:132
PixelFormat
Enumerated type containing the supported pixel formats that can be passed to loadFromMemory.
Definition: Texture.h:62
Texture implementation for the Direct3D11Renderer.
Definition: RendererModules/Direct3D11/Texture.h:50
Sizef d_size
Size of the texture.
Definition: RendererModules/Direct3D11/Texture.h:138
Sizef d_dataSize
original pixel of size data loaded into texture
Definition: RendererModules/Direct3D11/Texture.h:140
void initialiseShaderResourceView()
creates shader resource view for the current D3D texture