mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-25 08:08:50 +00:00
Restore mip/level value for non-layered FBO attachments. Refs #172
This commit is contained in:
1 parent
af12040a95
commit
2804c4414d
1 file changed
+2
-1
@@ -309,6 +309,7 @@ bool GLResourceManager::Prepare_InitialState(GLResource res, byte *blob)
|
||||
|
||||
if(object)
|
||||
{
|
||||
a.level = 0;
|
||||
gl.glGetNamedFramebufferAttachmentParameterivEXT(res.name, data->attachmentNames[i], eGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, &a.level);
|
||||
gl.glGetNamedFramebufferAttachmentParameterivEXT(res.name, data->attachmentNames[i], eGL_FRAMEBUFFER_ATTACHMENT_LAYERED, &layered);
|
||||
gl.glGetNamedFramebufferAttachmentParameterivEXT(res.name, data->attachmentNames[i], eGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER, &a.layer);
|
||||
@@ -1738,7 +1739,7 @@ void GLResourceManager::Apply_InitialState(GLResource live, InitialContentData i
|
||||
}
|
||||
else
|
||||
{
|
||||
gl.glNamedFramebufferTextureEXT(live.name, data->attachmentNames[i], obj, 0);
|
||||
gl.glNamedFramebufferTextureEXT(live.name, data->attachmentNames[i], obj, a.level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user