Crazy Eddie's GUI System
0.8.7
|
27 #ifndef _CEGUIDirect3D9Texture_h_
28 #define _CEGUIDirect3D9Texture_h_
30 #include "../../Base.h"
31 #include "../../Renderer.h"
32 #include "../../Texture.h"
33 #include "CEGUI/RendererModules/Direct3D9/Renderer.h"
36 # pragma warning(push)
37 # pragma warning(disable : 4251)
99 LPDIRECT3DTEXTURE9 tex);
113 LPDIRECT3DTEXTURE9 tex);
148 #if defined(_MSC_VER)
149 # pragma warning(pop)
152 #endif // end of guard _CEGUIDirect3D9Texture_h_
virtual ~Direct3D9Texture()
Destructor.
Texture & createTexture(const String &name, LPDIRECT3DTEXTURE9 tex)
create a CEGUI::texture from an existing D3D texture
Sizef d_size
Size of the texture.
Definition: RendererModules/Direct3D9/Texture.h:133
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...
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
LPDIRECT3DTEXTURE9 getDirect3D9Texture() const
Return the internal D3D9 texture used by this Texture object.
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 blitFromMemory(const void *sourceData, const Rectf &area)
Performs an area memory blit to the texture.
bool d_savedSurfaceDescValid
true when d_savedSurfaceDesc is valid and texture can be restored.
Definition: RendererModules/Direct3D9/Texture.h:141
Direct3D9Texture(Direct3D9Renderer &owner, const String &name, LPDIRECT3DTEXTURE9 tex)
Construct texture that wraps an existing D3D9 texture.
Direct3D9Texture(Direct3D9Renderer &owner, const String &name, const String &filename, const String &resourceGroup)
Construct texture from an image file.
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions.
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:54
LPDIRECT3DTEXTURE9 d_texture
The D3D9 texture we're wrapping.
Definition: RendererModules/Direct3D9/Texture.h:131
Texture implementation for the Direct3D9Renderer.
Definition: RendererModules/Direct3D9/Texture.h:45
Vector2f d_texelScaling
cached pixel to texel mapping scale values.
Definition: RendererModules/Direct3D9/Texture.h:137
const Vector2f & getTexelScaling() const
Returns pixel to texel scale values that should be used for converting pixel values to texture co-ord...
void setDirect3D9Texture(LPDIRECT3DTEXTURE9 tex)
set the D3D9 texture that this Texture is based on to the specified texture.
void cleanupDirect3D9Texture()
clean up the internal texture.
Direct3D9Texture(Direct3D9Renderer &owner, const String &name, const Sizef &sz)
Construct texture with a given size.
void createDirect3D9Texture(const Sizef sz, D3DFORMAT format)
create internal texture.
Sizef d_dataSize
original pixel of size data loaded into texture
Definition: RendererModules/Direct3D9/Texture.h:135
D3DSURFACE_DESC d_savedSurfaceDesc
holds info about the texture surface before we released it for reset.
Definition: RendererModules/Direct3D9/Texture.h:139
void postD3DReset()
auto called via the Renderer after Reset on the Direct3DDevice9.
String class used within the GUI system.
Definition: String.h:64
void updateTextureSize()
set d_size to actual texture size (d_dataSize is used if query fails)
Direct3D9Renderer & d_owner
Direct3D9Renderer object that created and owns this texture.
Definition: RendererModules/Direct3D9/Texture.h:129
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...
PixelFormat
Enumerated type containing the supported pixel formats that can be passed to loadFromMemory.
Definition: Texture.h:62
void blitToMemory(void *targetData)
Performs a complete blit from the texture surface to memory.
const Sizef & getSize() const
Returns the current pixel size of the texture.
const String & getName() const
Returns the name given to the texture when it was created.
Renderer class to interface with Direct3D 9.
Definition: RendererModules/Direct3D9/Renderer.h:65
void updateCachedScaleValues()
updates cached scale value used to map pixels to texture co-ords.
void preD3DReset()
auto called via the Renderer prior to Reset on the Direct3DDevice9.
Direct3D9Texture(Direct3D9Renderer &owner, const String &name)
Basic constructor.
IDirect3DSurface9 * getTextureSurface() const
get the IDirect3DSurface9 interface for the underlying texture.
bool isPixelFormatSupported(const PixelFormat fmt) const
Return whether the specified pixel format is supported by the system for the CEGUI::Texture implement...
const String d_name
Name the texture was created with.
Definition: RendererModules/Direct3D9/Texture.h:143