Added an abstract Renderer::clear method.

TRAC #22041 Unimplemented in Renderer11 and Renderer9 only forces the depth stencil state to reset. Signed-off-by: Shannon Woods Signed-off-by: Daniel Koch Author: Geoff Lang git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1423 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f39967e1
......@@ -2824,6 +2824,9 @@ void Context::clear(GLbitfield mask)
{
mDevice->Clear(0, NULL, flags, color, depth, stencil);
}
mRenderer->clear(mask, mState.colorClearValue, mState.depthClearValue, mState.stencilClearValue,
framebufferObject);
}
void Context::drawArrays(GLenum mode, GLint first, GLsizei count, GLsizei instances)
......
......@@ -82,6 +82,9 @@ class Renderer
virtual void applyRenderTarget(gl::Framebuffer *frameBuffer) = 0;
virtual void clear(GLbitfield mask, const gl::Color &colorClear, float depthClear, int stencilClear,
gl::Framebuffer *frameBuffer) = 0;
// lost device
virtual void markDeviceLost() = 0;
virtual bool isDeviceLost() = 0;
......
......@@ -269,6 +269,13 @@ void Renderer11::applyRenderTarget(gl::Framebuffer *frameBuffer)
UNIMPLEMENTED();
}
void Renderer11::clear(GLbitfield mask, const gl::Color &colorClear, float depthClear, int stencilClear,
gl::Framebuffer *frameBuffer)
{
// TODO
UNIMPLEMENTED();
}
void Renderer11::releaseDeviceResources()
{
// TODO
......
......@@ -56,6 +56,9 @@ class Renderer11 : public Renderer
virtual void applyRenderTarget(gl::Framebuffer *frameBuffer);
virtual void clear(GLbitfield mask, const gl::Color &colorClear, float depthClear, int stencilClear,
gl::Framebuffer *frameBuffer);
// lost device
virtual void markDeviceLost();
virtual bool isDeviceLost();
......
......@@ -865,6 +865,14 @@ void Renderer9::applyRenderTarget(gl::Framebuffer *frameBuffer)
// TODO
}
void Renderer9::clear(GLbitfield mask, const gl::Color &colorClear, float depthClear, int stencilClear,
gl::Framebuffer *frameBuffer)
{
mForceSetDepthStencilState = true;
// TODO
}
void Renderer9::releaseDeviceResources()
{
while (!mEventQueryPool.empty())
......
......@@ -79,6 +79,9 @@ class Renderer9 : public Renderer
virtual void applyRenderTarget(gl::Framebuffer *frameBuffer);
virtual void clear(GLbitfield mask, const gl::Color &colorClear, float depthClear, int stencilClear,
gl::Framebuffer *frameBuffer);
// lost device
virtual void markDeviceLost();
virtual bool isDeviceLost();
......
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