#include <cstdlib>
#include <GLES2/gl2.h>
#include <dali/integration-api/gl-abstraction.h>
-#include <dali/devel-api/threading/conditional-wait.h>
// INTERNAL INCLUDES
#include <dali/internal/graphics/gles/gles-abstraction.h>
public:
GlImplementation()
: mGlesVersion( 30 ),
- mIsSurfacelessContextSupported( false ),
- mIsContextCreated( false ),
- mContextCreatedWaitCondition(),
- mMaxTextureSize( 0 )
+ mIsSurfacelessContextSupported( false )
{
mImpl.reset( new Gles3Implementation() );
}
/* Do nothing in main implementation */
}
- void ContextCreated()
- {
- glGetIntegerv( GL_MAX_TEXTURE_SIZE, &mMaxTextureSize );
-
- if( !mIsContextCreated )
- {
- mContextCreatedWaitCondition.Notify();
- }
- mIsContextCreated = true;
- }
-
void SetGlesVersion( const int32_t glesVersion )
{
if( mGlesVersion != glesVersion )
return convert;
}
- int GetMaxTextureSize()
- {
- if( !mIsContextCreated )
- {
- mContextCreatedWaitCondition.Wait();
- }
- return mMaxTextureSize;
- }
-
/* OpenGL ES 2.0 */
void ActiveTexture( GLenum texture )
private:
int32_t mGlesVersion;
bool mIsSurfacelessContextSupported;
- bool mIsContextCreated;
- ConditionalWait mContextCreatedWaitCondition;
- GLint mMaxTextureSize;
std::unique_ptr<GlesAbstraction> mImpl;
};