mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-01 21:17:44 -05:00
fix: Make sure texture multisampling framebuffer is being unbinded in all cases
#1653
This commit is contained in:
@@ -119,6 +119,11 @@ namespace ImGuiExt {
|
||||
glGenFramebuffers(1, &framebuffer);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, framebuffer);
|
||||
|
||||
// Unbind framebuffer on exit
|
||||
ON_SCOPE_EXIT {
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
};
|
||||
|
||||
// Attach texture to color attachment 0
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D_MULTISAMPLE, texture, 0);
|
||||
|
||||
@@ -131,9 +136,6 @@ namespace ImGuiExt {
|
||||
return texture;
|
||||
}
|
||||
|
||||
// Unbind framebuffer
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
|
||||
#endif
|
||||
|
||||
return texture;
|
||||
|
||||
Reference in New Issue
Block a user