Creates the TextureStorageInterface class

TRAC #22300 Author: Shannon Woods Signed-off-by: Geoff Lang Signed-off-by: Daniel Koch git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1611 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent c5431eb2
......@@ -26,12 +26,14 @@ TextureStorage::TextureStorage(Renderer *renderer, DWORD usage)
mRenderer(Renderer9::makeRenderer9(renderer)),
mD3DUsage(usage),
mD3DPool(mRenderer->getTexturePool(usage)),
mTextureSerial(issueTextureSerial())
mTextureSerial(issueTextureSerial()),
mInterface(NULL)
{
}
TextureStorage::~TextureStorage()
{
delete mInterface;
}
DWORD TextureStorage::GetTextureUsage(D3DFORMAT d3dfmt, GLenum glusage, bool forceRenderable)
......
......@@ -25,6 +25,17 @@ class RenderTarget;
class RenderTarget9;
class Blit;
class TextureStorageInterface
{
public:
TextureStorageInterface();
virtual ~TextureStorageInterface();
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorageInterface);
};
class TextureStorage
{
public:
......@@ -35,6 +46,8 @@ class TextureStorage
static DWORD GetTextureUsage(D3DFORMAT d3dfmt, GLenum glusage, bool forceRenderable);
static bool IsTextureFormatRenderable(D3DFORMAT format);
TextureStorageInterface *getStorageInterface() { return mInterface; }
bool isRenderTarget() const;
bool isManaged() const;
D3DPOOL getPool() const;
......@@ -48,6 +61,7 @@ class TextureStorage
protected:
int mLodOffset;
rx::Renderer9 *mRenderer;
TextureStorageInterface *mInterface;
private:
DISALLOW_COPY_AND_ASSIGN(TextureStorage);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment