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