am 42dd982a: Merge "opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D"
* commit '42dd982af0a312c6fa25676b2cb0ff5911e198e6': opengles emulator: 2.0: handle texture=0 on glFramebufferTexture2D
This commit is contained in:
@@ -612,10 +612,18 @@ 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(ctx->shareGroup().Ptr()) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user