28 #ifndef _CEGUIDirect3D9Texture_h_
29 #define _CEGUIDirect3D9Texture_h_
31 #include "../../CEGUIBase.h"
32 #include "../../CEGUIRenderer.h"
33 #include "../../CEGUITexture.h"
34 #include "CEGUIDirect3D9Renderer.h"
48 void setDirect3D9Texture(LPDIRECT3DTEXTURE9 tex);
57 LPDIRECT3DTEXTURE9 getDirect3D9Texture()
const;
66 void setOriginalDataSize(
const Size& sz);
75 const Size& getSize()
const;
76 const Size& getOriginalDataSize()
const;
77 const Vector2& getTexelScaling()
const;
78 void loadFromFile(
const String& filename,
const String& resourceGroup);
79 void loadFromMemory(
const void* buffer,
const Size& buffer_size,
81 void saveToMemory(
void* buffer);
95 const String& resourceGroup);
104 void cleanupDirect3D9Texture();
106 void updateCachedScaleValues();
108 void updateTextureSize();
129 #endif // end of guard _CEGUIDirect3D9Texture_h_
Class used as a two dimensional vector (aka a Point)
Definition: CEGUIVector.h:45
Direct3D9Renderer & d_owner
Direct3D9Renderer object that created and owns this texture.
Definition: CEGUIDirect3D9Texture.h:111
PixelFormat
Enumerated type containing the supported pixel formats that can be passed to loadFromMemory.
Definition: CEGUITexture.h:58
Size d_dataSize
original pixel of size data loaded into texture
Definition: CEGUIDirect3D9Texture.h:117
Class that holds the size (width & height) of something.
Definition: CEGUISize.h:43
Renderer class to interface with Direct3D 9.
Definition: CEGUIDirect3D9Renderer.h:64
Texture & createTexture()
Create a 'null' Texture object.
Texture implementation for the Direct3D9Renderer.
Definition: CEGUIDirect3D9Texture.h:40
Abstract base class specifying the required interface for Texture objects.
Definition: CEGUITexture.h:50
LPDIRECT3DTEXTURE9 d_texture
The D3D9 texture we're wrapping.
Definition: CEGUIDirect3D9Texture.h:113
D3DSURFACE_DESC d_savedSurfaceDesc
holds info about the texture surface before we released it for reset.
Definition: CEGUIDirect3D9Texture.h:121
void destroyTexture(Texture &texture)
Destroy a Texture object that was previously created by calling the createTexture functions...
Vector2 d_texelScaling
cached pixel to texel mapping scale values.
Definition: CEGUIDirect3D9Texture.h:119
bool d_savedSurfaceDescValid
true when d_savedSurfaceDesc is valid and texture can be restored.
Definition: CEGUIDirect3D9Texture.h:123
Size d_size
Size of the texture.
Definition: CEGUIDirect3D9Texture.h:115
String class used within the GUI system.
Definition: CEGUIString.h:57