[Tizen] Using Depth and Stencil buffer & texture
[platform/core/uifw/dali-core.git] / dali / devel-api / rendering / frame-buffer-devel.cpp
index f515e70..d79ded7 100644 (file)
@@ -27,12 +27,52 @@ namespace Dali
 namespace DevelFrameBuffer
 {
 
+void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture )
+{
+  AttachDepthTexture( frameBuffer, texture, 0u );
+}
+
+void AttachDepthTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel )
+{
+  if( texture )
+  {
+    Internal::TexturePtr texturePtr( &GetImplementation( texture ) );
+    GetImplementation( frameBuffer ).AttachDepthTexture( texturePtr, mipmapLevel );
+  }
+}
+
+void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture )
+{
+  AttachDepthStencilTexture( frameBuffer, texture, 0u );
+}
+
+void AttachDepthStencilTexture( FrameBuffer frameBuffer, Texture& texture, uint32_t mipmapLevel )
+{
+  if( texture )
+  {
+    Internal::TexturePtr texturePtr( &GetImplementation( texture ) );
+    GetImplementation( frameBuffer ).AttachDepthStencilTexture( texturePtr, mipmapLevel );
+  }
+}
+
 Texture GetColorTexture( const FrameBuffer frameBuffer, uint8_t index )
 {
   Internal::Texture* texturePtr = GetImplementation( frameBuffer ).GetColorTexture(index);
   return Dali::Texture( texturePtr );
 }
 
+Texture GetDepthTexture( FrameBuffer frameBuffer )
+{
+  Internal::Texture* texturePtr = GetImplementation(frameBuffer).GetDepthTexture();
+  return Dali::Texture( texturePtr );
+}
+
+Texture GetDepthStencilTexture( FrameBuffer frameBuffer )
+{
+  Internal::Texture* texturePtr = GetImplementation(frameBuffer).GetDepthStencilTexture();
+  return Dali::Texture( texturePtr );
+}
+
 } // namespace DevelFrameBuffer
 
 } // namespace Dali