Add a helper method to gl::Framebuffer to check if we are drawing to color attachment 0 only.

TRAC #22898 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@2217 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent f9cd9118
...@@ -303,6 +303,19 @@ bool Framebuffer::hasStencil() const ...@@ -303,6 +303,19 @@ bool Framebuffer::hasStencil() const
return false; return false;
} }
bool Framebuffer::usingExtendedDrawBuffers() const
{
for (unsigned int colorAttachment = 1; colorAttachment < IMPLEMENTATION_MAX_DRAW_BUFFERS; colorAttachment++)
{
if (isEnabledColorAttachment(colorAttachment))
{
return true;
}
}
return false;
}
GLenum Framebuffer::completeness() const GLenum Framebuffer::completeness() const
{ {
int width = 0; int width = 0;
......
...@@ -68,6 +68,7 @@ class Framebuffer ...@@ -68,6 +68,7 @@ class Framebuffer
bool hasEnabledColorAttachment() const; bool hasEnabledColorAttachment() const;
bool hasStencil() const; bool hasStencil() const;
int getSamples() const; int getSamples() const;
bool usingExtendedDrawBuffers() const;
virtual GLenum completeness() const; virtual GLenum completeness() const;
......
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