Merge "opengl translator: fixed glGetString(GL_EXTENSIONS) for GLESv2"
This commit is contained in:
@@ -556,11 +556,11 @@ static bool destroySurfaceIfNotCurrent(EglDisplay* dpy,SurfacePtr surface) {
|
||||
|
||||
ThreadInfo* thread = getThreadInfo();
|
||||
EglContext* currCtx = static_cast<EglContext*>(thread->eglContext);
|
||||
if(currCtx && !currCtx->usingSurface(surface)){
|
||||
if((!currCtx) || (currCtx && !currCtx->usingSurface(surface))){
|
||||
if(surface->type() == EglSurface::PBUFFER) {
|
||||
EglOS::releasePbuffer(dpy->nativeType(),reinterpret_cast<EGLNativePbufferType>(surface->native()));
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,6 @@ GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name){
|
||||
static GLubyte VENDOR[] = "Google";
|
||||
static GLubyte RENDERER[] = "OpenGL ES 2.0";
|
||||
static GLubyte VERSION[] = "OpenGL ES 2.0";
|
||||
static GLubyte EXTENSIONS[] = "";
|
||||
static GLubyte SHADING[] = "OpenGL ES GLSL ES 1.0.17";
|
||||
switch(name) {
|
||||
case GL_VENDOR:
|
||||
@@ -736,7 +735,7 @@ GL_APICALL const GLubyte* GL_APIENTRY glGetString(GLenum name){
|
||||
case GL_SHADING_LANGUAGE_VERSION:
|
||||
return SHADING;
|
||||
case GL_EXTENSIONS:
|
||||
return EXTENSIONS;
|
||||
return (const GLubyte*)ctx->getExtensionString();
|
||||
default:
|
||||
RET_AND_SET_ERROR_IF(true,GL_INVALID_ENUM,NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user