Create D3D textures within Storage classes. Fixed render target reference counting.

TRAC #18730 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@853 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent afa8ef36
......@@ -305,6 +305,11 @@ Colorbuffer::~Colorbuffer()
IDirect3DSurface9 *Colorbuffer::getRenderTarget()
{
if (mRenderTarget)
{
mRenderTarget->AddRef();
}
return mRenderTarget;
}
......
......@@ -232,7 +232,8 @@ class Texture : public RefCountObject
class TextureStorage2D : public TextureStorage
{
public:
TextureStorage2D(IDirect3DTexture9 *texture, bool renderable);
explicit TextureStorage2D(IDirect3DTexture9 *surfaceTexture);
TextureStorage2D(int levels, D3DFORMAT format, int width, int height, bool renderable);
virtual ~TextureStorage2D();
......@@ -299,7 +300,7 @@ class Texture2D : public Texture
class TextureStorageCubeMap : public TextureStorage
{
public:
TextureStorageCubeMap(IDirect3DCubeTexture9 *texture, bool renderable);
TextureStorageCubeMap(int levels, D3DFORMAT format, int size, bool renderable);
virtual ~TextureStorageCubeMap();
......
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