+ if( ( texture->GetWidth() / ( 1u << mipmapLevel ) != mWidth ) ||
+ ( texture->GetHeight() / ( 1u << mipmapLevel ) != mHeight ) )
+ {
+ DALI_LOG_ERROR( "Failed to attach color texture to FrameBuffer: Size mismatch \n" );
+ }
+ else if ( mColorAttachmentCount >= Dali::DevelFrameBuffer::MAX_COLOR_ATTACHMENTS )
+ {
+ DALI_LOG_ERROR( "Failed to attach color texture to FrameBuffer: Exceeded maximum supported color attachments.\n" );
+ }
+ else
+ {
+ mColor[mColorAttachmentCount] = texture;
+ ++mColorAttachmentCount;
+
+ AttachColorTextureToFrameBuffer( mEventThreadServices.GetUpdateManager(), *mRenderObject, texture->GetRenderObject(), mipmapLevel, layer );
+ }
+ }
+}
+
+Texture* FrameBuffer::GetColorTexture(uint8_t index) const
+{
+ return ( mIsSurfaceBacked || index >= mColorAttachmentCount ) ? nullptr : mColor[index].Get();
+}
+
+void FrameBuffer::SetSize( uint32_t width, uint32_t height )
+{
+ mWidth = width;
+ mHeight = height;
+
+ if( mRenderObject->IsSurfaceBacked() )
+ {
+ SetFrameBufferSizeMessage( mEventThreadServices.GetUpdateManager(), static_cast<Render::SurfaceFrameBuffer*>( mRenderObject ), width, height );