mActiveTextureUnit = 0;
mCheckFramebufferStatusResult = 0;
mFramebufferStatus = 0;
- mFramebufferColorAttached = 0;
mFramebufferDepthAttached = 0;
mFramebufferStencilAttached = 0;
+ mFramebufferColorAttachmentCount = 0;
+ mFrameBufferColorStatus = 0;
mNumBinaryFormats = 0;
mBinaryFormats = 0;
mProgramBinaryLength = 0;
return mCheckFramebufferStatusResult;
}
- inline GLenum CheckFramebufferColorAttachment()
+ inline GLuint CheckFramebufferColorAttachmentCount()
{
- return mFramebufferColorAttached;
+ return mFramebufferColorAttachmentCount;
}
inline GLenum CheckFramebufferDepthAttachment()
mFramebufferStatus |= 4;
//We check 4 attachment colors
- if ((attachment == GL_COLOR_ATTACHMENT0) || (attachment == GL_COLOR_ATTACHMENT1) || (attachment == GL_COLOR_ATTACHMENT2) || (attachment == GL_COLOR_ATTACHMENT4))
+ if ((attachment >= GL_COLOR_ATTACHMENT0) && (attachment < GL_COLOR_ATTACHMENT0 + Dali::FrameBuffer::MAX_COLOR_ATTACHMENTS))
{
- mFramebufferColorAttached = true;
+ uint8_t mask = 1 << (attachment - GL_COLOR_ATTACHMENT0);
+ if ((mFrameBufferColorStatus & mask) == 0)
+ {
+ mFrameBufferColorStatus |= mask;
+ ++mFramebufferColorAttachmentCount;
+ }
}
}
GLenum mActiveTextureUnit;
GLenum mCheckFramebufferStatusResult;
GLint mFramebufferStatus;
- GLenum mFramebufferColorAttached;
GLenum mFramebufferDepthAttached;
GLenum mFramebufferStencilAttached;
+ GLuint mFramebufferColorAttachmentCount;
+ GLuint mFrameBufferColorStatus;
GLint mNumBinaryFormats;
GLint mBinaryFormats;
GLint mProgramBinaryLength;