programController( glAbstraction ),
depthBufferAvailable( depthBufferAvailableParam ),
stencilBufferAvailable( stencilBufferAvailableParam ),
- partialUpdateAvailable( partialUpdateAvailableParam ),
- defaultSurfaceOrientation( 0 )
+ partialUpdateAvailable( partialUpdateAvailableParam )
{
// Create thread pool with just one thread ( there may be a need to create more threads in the future ).
threadPool = std::unique_ptr<Dali::ThreadPool>( new Dali::ThreadPool() );
std::unique_ptr<Dali::ThreadPool> threadPool; ///< The thread pool
Vector<GLuint> boundTextures; ///< The textures bound for rendering
Vector<GLuint> textureDependencyList; ///< The dependency list of binded textures
- int defaultSurfaceOrientation; ///< defaultSurfaceOrientation for the default surface we are rendering to
};
RenderManager* RenderManager::New( Integration::GlAbstraction& glAbstraction,
}
RenderManager::RenderManager()
-: mImpl(NULL)
+: mImpl(nullptr)
{
}
mImpl->defaultSurfaceRect = rect;
}
-void RenderManager::SetDefaultSurfaceOrientation( int orientation )
-{
- mImpl->defaultSurfaceOrientation = orientation;
-}
-
void RenderManager::AddRenderer( OwnerPointer< Render::Renderer >& renderer )
{
// Initialize the renderer as we are now in render thread
frameBuffer->AttachDepthStencilTexture( mImpl->context, texture, mipmapLevel );
}
+void RenderManager::CaptureRenderingResult(Render::FrameBuffer* frameBuffer)
+{
+ frameBuffer->CaptureRenderingResult();
+}
+
void RenderManager::AddVertexBuffer( OwnerPointer< Render::VertexBuffer >& vertexBuffer )
{
mImpl->vertexBufferContainer.PushBack( vertexBuffer.Release() );
return;
}
+ Internal::Scene& sceneInternal = GetImplementation(scene);
+ SceneGraph::Scene* sceneObject = sceneInternal.GetSceneObject();
+
// @TODO We need to do partial rendering rotation.
- if( mImpl->defaultSurfaceOrientation != 0 )
+ if( sceneObject && sceneObject->GetSurfaceOrientation() != 0 )
{
return;
}
// Clean collected dirty/damaged rects on exit if 3d layer or 3d node or other conditions.
DamagedRectsCleaner damagedRectCleaner(damagedRects);
-
-
- Internal::Scene& sceneInternal = GetImplementation(scene);
- SceneGraph::Scene* sceneObject = sceneInternal.GetSceneObject();
-
// Mark previous dirty rects in the sorted array. The array is already sorted by node and renderer, frame number.
// so you don't need to sort: std::stable_sort(itemsDirtyRects.begin(), itemsDirtyRects.end());
std::vector<DirtyRect>& itemsDirtyRects = sceneInternal.GetItemsDirtyRects();
i++;
}
- if( j != itemsDirtyRects.begin() )
- {
- itemsDirtyRects.resize(j - itemsDirtyRects.begin());
- }
+ itemsDirtyRects.resize(j - itemsDirtyRects.begin());
damagedRectCleaner.SetCleanOnReturn(false);
}
Rect<int32_t> surfaceRect = mImpl->defaultSurfaceRect;
Integration::DepthBufferAvailable depthBufferAvailable = mImpl->depthBufferAvailable;
Integration::StencilBufferAvailable stencilBufferAvailable = mImpl->stencilBufferAvailable;
- int surfaceOrientation = mImpl->defaultSurfaceOrientation;
+ int surfaceOrientation = sceneObject->GetSurfaceOrientation();
if ( instruction.mFrameBuffer )
{
clearMask |= GL_STENCIL_BUFFER_BIT;
}
- if( !instruction.mIgnoreRenderToFbo && ( instruction.mFrameBuffer != 0 ) )
+ if( !instruction.mIgnoreRenderToFbo && ( instruction.mFrameBuffer != nullptr ) )
{
// Offscreen buffer rendering
if ( instruction.mIsViewportSet )
}
bool clearFullFrameRect = true;
- if( instruction.mFrameBuffer != 0 )
+ if( instruction.mFrameBuffer != nullptr )
{
Viewport frameRect( 0, 0, instruction.mFrameBuffer->GetWidth(), instruction.mFrameBuffer->GetHeight() );
clearFullFrameRect = ( frameRect == viewportRect );
if ( renderToFbo )
{
mImpl->currentContext->Flush();
+ instruction.mFrameBuffer->DrawRenderedBuffer(*mImpl->currentContext);
}
}