Impl( Integration::GlAbstraction& glAbstraction,
Integration::GlSyncAbstraction& glSyncAbstraction,
LockedResourceQueue& textureUploadedQ,
- TextureUploadedDispatcher& postProcessDispatcher )
+ TextureUploadedDispatcher& postProcessDispatcher,
+ GeometryBatcher& geometryBatcher )
: context( glAbstraction ),
glSyncAbstraction( glSyncAbstraction ),
renderQueue(),
renderersAdded( false ),
firstRenderCompleted( false ),
defaultShader( NULL ),
- programController( glAbstraction )
+ programController( glAbstraction ),
+ geometryBatcher( geometryBatcher )
{
}
bool firstRenderCompleted; ///< False until the first render is done
Shader* defaultShader; ///< Default shader to use
ProgramController programController; ///< Owner of the GL programs
+
+ SceneGraph::GeometryBatcher& geometryBatcher; ///< Instance of geometry batcher
};
RenderManager* RenderManager::New( Integration::GlAbstraction& glAbstraction,
Integration::GlSyncAbstraction& glSyncAbstraction,
+ SceneGraph::GeometryBatcher& geometryBatcher,
LockedResourceQueue& textureUploadedQ )
{
RenderManager* manager = new RenderManager;
- manager->mImpl = new Impl( glAbstraction, glSyncAbstraction, textureUploadedQ, *manager );
+ manager->mImpl = new Impl( glAbstraction, glSyncAbstraction, textureUploadedQ, *manager, geometryBatcher );
return manager;
}
TextureOwnerContainer& textures = mImpl->textureContainer;
- // Find the sampler
+ // Find the texture
for ( TextureOwnerIter iter = textures.Begin(); iter != textures.End(); ++iter )
{
if ( *iter == texture )
}
}
-void RenderManager::UploadTexture( Render::NewTexture* texture, Vector<unsigned char>& buffer, const TextureUploadParams& params )
+void RenderManager::UploadTexture( Render::NewTexture* texture, PixelDataPtr pixelData, const NewTexture::UploadParams& params )
{
- texture->Upload( mImpl->context, buffer, params );
+ texture->Upload( mImpl->context, pixelData, params );
}
void RenderManager::GenerateMipmaps( Render::NewTexture* texture )
void RenderManager::SetGeometryType( Render::Geometry* geometry, unsigned int geometryType )
{
- geometry->SetGeometryType( Render::Geometry::GeometryType(geometryType) );
+ geometry->SetType( Render::Geometry::Type(geometryType) );
}
void RenderManager::AddRenderTracker( Render::RenderTracker* renderTracker )
// Core::Render documents that GL context must be current before calling Render
DALI_ASSERT_DEBUG( mImpl->context.IsGlContextCreated() );
- status.SetHasRendered( false );
-
// Increment the frame count at the beginning of each frame
++(mImpl->frameCount);
RenderInstruction& instruction = mImpl->instructions.At( mImpl->renderBufferIndex, i );
DoRender( instruction, *mImpl->defaultShader );
-
- const RenderListContainer::SizeType countRenderList = instruction.RenderListCount();
- if ( countRenderList > 0 )
- {
- status.SetHasRendered( true );
- }
}
GLenum attachments[] = { GL_DEPTH, GL_STENCIL };
mImpl->context.InvalidateFramebuffer(GL_FRAMEBUFFER, 2, attachments);
mImpl->context,
mImpl->textureCache,
defaultShader,
+ mImpl->geometryBatcher,
mImpl->renderBufferIndex );
if(instruction.mOffscreenTextureId != 0)