Don't try and bind a non-layered texture with a specific layer to an FBO

This commit is contained in:
baldurk
2016-09-01 17:45:57 +02:00
parent e83bb9d7e9
commit f0d4547480
+8 -1
View File
@@ -1878,11 +1878,18 @@ void GLResourceManager::Apply_InitialState(GLResource live, InitialContentData i
obj, a.level);
}
}
else
else if(details.curType == eGL_TEXTURE_CUBE_MAP_ARRAY ||
details.curType == eGL_TEXTURE_1D_ARRAY ||
details.curType == eGL_TEXTURE_2D_ARRAY)
{
gl.glFramebufferTextureLayer(eGL_DRAW_FRAMEBUFFER, data->attachmentNames[i], obj,
a.level, a.layer);
}
else
{
RDCASSERT(a.layer == 0);
gl.glNamedFramebufferTextureEXT(live.name, data->attachmentNames[i], obj, a.level);
}
}
else
{