void EglGraphics::SetGlesVersion(const int32_t glesVersion)
{
- mEglImplementation->SetGlesVersion(glesVersion);
+ if(mEglImplementation)
+ {
+ mEglImplementation->SetGlesVersion(glesVersion);
+ }
+
mGLES->SetGlesVersion(glesVersion);
}
void EglGraphics::ActivateResourceContext()
{
- if(mEglImplementation->IsSurfacelessContextSupported())
+ if(mEglImplementation && mEglImplementation->IsSurfacelessContextSupported())
{
// Make the shared surfaceless context as current before rendering
mEglImplementation->MakeContextCurrent(EGL_NO_SURFACE, mEglImplementation->GetContext());
void EglGraphics::SetFirstFrameAfterResume()
{
- mEglImplementation->SetFirstFrameAfterResume();
+ if(mEglImplementation)
+ {
+ mEglImplementation->SetFirstFrameAfterResume();
+ }
}
void EglGraphics::Initialize()
void EglGraphics::ConfigureSurface(Dali::RenderSurfaceInterface* surface)
{
+ DALI_ASSERT_ALWAYS(mEglImplementation && "EGLImplementation not created");
+
// Try to use OpenGL es 3.0
// ChooseConfig returns false here when the device only support gles 2.0.
// Because eglChooseConfig with gles 3.0 setting fails when the device only support gles 2.0 and Our default setting is gles 3.0.
void EglGraphics::Shutdown()
{
- mEglImplementation->TerminateGles();
+ if(mEglImplementation)
+ {
+ mEglImplementation->TerminateGles();
+ }
}
void EglGraphics::Destroy()
EglImplementation& EglGraphics::GetEglImplementation() const
{
- DALI_ASSERT_DEBUG(mEglImplementation && "EGLImplementation not created");
+ DALI_ASSERT_ALWAYS(mEglImplementation && "EGLImplementation not created");
return *mEglImplementation;
}
EglInterface& EglGraphics::GetEglInterface() const
{
- DALI_ASSERT_DEBUG(mEglImplementation && "EGLImplementation not created");
+ DALI_ASSERT_ALWAYS(mEglImplementation && "EGLImplementation not created");
EglInterface* eglInterface = mEglImplementation.get();
return *eglInterface;
}
*/
bool IsInitialized() override
{
- return mEglImplementation->IsGlesInitialized();
+ return mEglImplementation && mEglImplementation->IsGlesInitialized();
}
bool IsResourceContextSupported() override
{
- return mEglImplementation->IsSurfacelessContextSupported();
+ return mEglImplementation && mEglImplementation->IsSurfacelessContextSupported();
}
uint32_t GetMaxTextureSize() override