am 2b96b0fc: am 42dd982a: Merge "opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D"

* commit '2b96b0fc993914b3908dd103c05d50768fcbc0dd':
  opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D
This commit is contained in:
David Turner
2011-08-09 10:06:36 -07:00
committed by Android Git Automerger

View File

@@ -612,11 +612,19 @@ GL_APICALL void GL_APIENTRY glFramebufferTexture2D(GLenum target, GLenum attach
GLESv2Validate::framebufferAttachment(attachment)),GL_INVALID_ENUM);
SET_ERROR_IF(level != 0, GL_INVALID_VALUE);
if(texture == 0)
{
// Special case - detach texture
ctx->dispatcher().glFramebufferTexture2DEXT(target,attachment,textarget,0,level);
}
else
{
if(ctx->shareGroup().Ptr()) {
ObjectLocalName texname = TextureLocalName(textarget,texture);
GLuint globalTextureName = ctx->shareGroup()->getGlobalName(TEXTURE,texname);
ctx->dispatcher().glFramebufferTexture2DEXT(target,attachment,textarget,globalTextureName,level);
}
}
}