Passes the swapchain to texture storage constructor instead of d3d texture.

TRAC #21910 Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1370 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f032cb88
......@@ -666,7 +666,7 @@ void Texture2D::bindTexImage(egl::Surface *surface)
delete mTexStorage;
renderer::SwapChain *swapchain = surface->getSwapChain(); // D3D9_REPLACE
mTexStorage = new TextureStorage2D(swapchain->getOffscreenTexture());
mTexStorage = new TextureStorage2D(swapchain);
mDirtyImages = true;
mSurface = surface;
......
......@@ -10,6 +10,7 @@
#include "libGLESv2/main.h"
#include "libGLESv2/renderer/TextureStorage.h"
#include "libGLESv2/renderer/SwapChain.h"
#include "common/debug.h"
......@@ -152,8 +153,9 @@ int TextureStorage::getLodOffset() const
return mLodOffset;
}
TextureStorage2D::TextureStorage2D(IDirect3DTexture9 *surfaceTexture) : TextureStorage(D3DUSAGE_RENDERTARGET), mRenderTargetSerial(RenderbufferStorage::issueSerial())
TextureStorage2D::TextureStorage2D(renderer::SwapChain *swapchain) : TextureStorage(D3DUSAGE_RENDERTARGET), mRenderTargetSerial(RenderbufferStorage::issueSerial())
{
IDirect3DTexture9 *surfaceTexture = swapchain->getOffscreenTexture();
mTexture = surfaceTexture;
}
......
......@@ -17,6 +17,11 @@
#include "common/debug.h"
namespace renderer
{
class SwapChain;
}
namespace gl
{
......@@ -57,7 +62,7 @@ class TextureStorage
class TextureStorage2D : public TextureStorage
{
public:
explicit TextureStorage2D(IDirect3DTexture9 *surfaceTexture);
explicit TextureStorage2D(renderer::SwapChain *swapchain);
TextureStorage2D(int levels, GLenum internalformat, GLenum usage, bool forceRenderable, GLsizei width, GLsizei height);
virtual ~TextureStorage2D();
......
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