bool TestApplication::Render( uint32_t intervalMilliseconds, const char* location )
{
DoUpdate( intervalMilliseconds, location );
- mCore->Render( mRenderStatus, false );
+ mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ );
mFrame++;
bool TestApplication::RenderOnly( )
{
// Update Time values
- mCore->Render( mRenderStatus, false );
+ mCore->Render( mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/ );
mFrame++;
mImpl->Update( elapsedSeconds, lastVSyncTimeMilliseconds, nextVSyncTimeMilliseconds, status, renderToFboEnabled, isRenderingToFbo );
}
-void Core::Render( RenderStatus& status, bool forceClear )
+void Core::Render( RenderStatus& status, bool forceClear, bool uploadOnly )
{
- mImpl->Render( status, forceClear );
+ mImpl->Render( status, forceClear, uploadOnly );
}
void Core::RegisterProcessor( Processor& processor )
* @pre The GL context must have been created, and made current.
* @param[out] status showing whether update is required to run.
* @param[in] forceClear force the Clear on the framebuffer even if nothing is rendered.
+ * @param[in] uploadOnly uploadOnly Upload the resource only without rendering.
*/
- void Render( RenderStatus& status, bool forceClear );
+ void Render( RenderStatus& status, bool forceClear, bool uploadOnly );
/**
* @brief Register a processor
// Any message to update will wake it up anyways
}
-void Core::Render( RenderStatus& status, bool forceClear )
+void Core::Render( RenderStatus& status, bool forceClear, bool uploadOnly )
{
- mRenderManager->Render( status, forceClear );
+ mRenderManager->Render( status, forceClear, uploadOnly );
}
void Core::SceneCreated()
/**
* @copydoc Dali::Integration::Core::Render()
*/
- void Render( Integration::RenderStatus& status, bool forceClear );
+ void Render( Integration::RenderStatus& status, bool forceClear, bool uploadOnly );
/**
* @copydoc Dali::Integration::Core::SceneCreated()
return &(mImpl->programController);
}
-void RenderManager::Render( Integration::RenderStatus& status, bool forceClear )
+void RenderManager::Render( Integration::RenderStatus& status, bool forceClear, bool uploadOnly )
{
DALI_PRINT_RENDER_START( mImpl->renderBufferIndex );
{
DALI_LOG_INFO( gLogFilter, Debug::General, "Render: Processing\n" );
- // Mark that we will require a post-render step to be performed (includes swap-buffers).
- status.SetNeedsPostRender( true );
+ if ( !uploadOnly )
+ {
+ // Mark that we will require a post-render step to be performed (includes swap-buffers).
+ status.SetNeedsPostRender( true );
+ }
// Switch to the shared context
if ( mImpl->currentContext != &mImpl->context )
}
}
- for( uint32_t i = 0; i < count; ++i )
+ if ( !uploadOnly )
{
- RenderInstruction& instruction = mImpl->instructions.At( mImpl->renderBufferIndex, i );
+ for( uint32_t i = 0; i < count; ++i )
+ {
+ RenderInstruction& instruction = mImpl->instructions.At( mImpl->renderBufferIndex, i );
- DoRender( instruction );
- }
+ DoRender( instruction );
+ }
- if ( mImpl->currentContext->IsSurfacelessContextSupported() )
- {
- mImpl->glContextHelperAbstraction.MakeSurfacelessContextCurrent();
- }
+ if ( mImpl->currentContext->IsSurfacelessContextSupported() )
+ {
+ mImpl->glContextHelperAbstraction.MakeSurfacelessContextCurrent();
+ }
- GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
- mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
- for ( auto&& context : mImpl->surfaceContextContainer )
- {
- context->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+ GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
+ mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+ for ( auto&& context : mImpl->surfaceContextContainer )
+ {
+ context->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
+ }
}
//Notify RenderGeometries that rendering has finished
/**
* Renders the results of the previous "update" traversal.
* @param[out] status contains the rendering flags.
- * @param[in] forceClear force the Clear on the framebuffer even if nothing is rendered.
+ * @param[in] forceClear Force the Clear on the framebuffer even if nothing is rendered.
+ * @param[in] uploadOnly Upload the resource only without rendering.
*/
- void Render( Integration::RenderStatus& status, bool forceClear );
+ void Render( Integration::RenderStatus& status, bool forceClear, bool uploadOnly );
private: