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)
52 void setDirect3D9Texture(LPDIRECT3DTEXTURE9 tex);
61 LPDIRECT3DTEXTURE9 getDirect3D9Texture()
const;
70 void setOriginalDataSize(
const Sizef& sz);
79 const String& getName()
const;
80 const Sizef& getSize()
const;
81 const Sizef& getOriginalDataSize()
const;
82 const Vector2f& getTexelScaling()
const;
83 void loadFromFile(
const String& filename,
const String& resourceGroup);
84 void loadFromMemory(
const void* buffer,
const Sizef& buffer_size,
86 void blitFromMemory(
const void* sourceData,
const Rectf& area);
87 void blitToMemory(
void* targetData);
88 bool isPixelFormatSupported(
const PixelFormat fmt)
const;
99 LPDIRECT3DTEXTURE9 tex);
113 LPDIRECT3DTEXTURE9 tex);
118 void createDirect3D9Texture(
const Sizef sz, D3DFORMAT format);
120 void cleanupDirect3D9Texture();
122 IDirect3DSurface9* getTextureSurface()
const;
124 void updateCachedScaleValues();
126 void updateTextureSize();
148 #if defined(_MSC_VER)
149 # pragma warning(pop)
152 #endif // end of guard _CEGUIDirect3D9Texture_h_
Sizef d_size
Size of the texture.
Definition: RendererModules/Direct3D9/Texture.h:133
Direct3D9Renderer & d_owner
Direct3D9Renderer object that created and owns this texture.
Definition: RendererModules/Direct3D9/Texture.h:129
PixelFormat
Enumerated type containing the supported pixel formats that can be passed to loadFromMemory.
Definition: Texture.h:61
const String d_name
Name the texture was created with.
Definition: RendererModules/Direct3D9/Texture.h:143
Main namespace for Crazy Eddie's GUI Library.
Definition: arch_overview.dox:1
Renderer class to interface with Direct3D 9.
Definition: RendererModules/Direct3D9/Renderer.h:64
Texture implementation for the Direct3D9Renderer.
Definition: RendererModules/Direct3D9/Texture.h:44
Abstract base class specifying the required interface for Texture objects.
Definition: Texture.h:52
Vector2f d_texelScaling
cached pixel to texel mapping scale values.
Definition: RendererModules/Direct3D9/Texture.h:137
LPDIRECT3DTEXTURE9 d_texture
The D3D9 texture we're wrapping.
Definition: RendererModules/Direct3D9/Texture.h:131
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 destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions...
Texture & createTexture(const String &name, LPDIRECT3DTEXTURE9 tex)
create a CEGUI::texture from an existing D3D texture
bool d_savedSurfaceDescValid
true when d_savedSurfaceDesc is valid and texture can be restored.
Definition: RendererModules/Direct3D9/Texture.h:141
String class used within the GUI system.
Definition: String.h:62