Merge "opengl translator: fixed glGetString(GL_EXTENSIONS) for GLESv2"

This commit is contained in:
David Turner
2011-07-03 05:00:06 -07:00
committed by Android Code Review
2 changed files with 3 additions and 4 deletions

View File

@@ -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;
}

View File

@@ -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);
}