aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2022-06-02 00:55:29 +0200
committerNadia Holmquist Pedersen <nadia@nhp.sh>2022-06-02 00:55:29 +0200
commit35cbda900190ef05fd3df2fa2950657d25b654b6 (patch)
tree7d090f77dbe78a35ebb6347a5d32c3a0a548bf8b /src
parentf85925fcd6c342313f009aae0f72629b9d96b9f8 (diff)
GL: Fix 16x resolution on macOS
Diffstat (limited to 'src')
-rw-r--r--src/GPU_OpenGL.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/GPU_OpenGL.cpp b/src/GPU_OpenGL.cpp
index 2fc97d5..79adf7a 100644
--- a/src/GPU_OpenGL.cpp
+++ b/src/GPU_OpenGL.cpp
@@ -153,14 +153,14 @@ void GLCompositor::SetRenderSettings(RenderSettings& settings)
glBindTexture(GL_TEXTURE_2D, CompScreenOutputTex[i]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, ScreenW, ScreenH, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
// fill the padding
- u8 zeroPixels[ScreenW*2*scale*4];
- memset(zeroPixels, 0, sizeof(zeroPixels));
+ u8* zeroPixels = (u8*) calloc(1, ScreenW*2*scale*4);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 192*scale, ScreenW, 2*scale, GL_RGBA, GL_UNSIGNED_BYTE, zeroPixels);
GLenum fbassign[] = {GL_COLOR_ATTACHMENT0};
glBindFramebuffer(GL_FRAMEBUFFER, CompScreenOutputFB[i]);
glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, CompScreenOutputTex[i], 0);
glDrawBuffers(1, fbassign);
+ free(zeroPixels);
}
glBindFramebuffer(GL_FRAMEBUFFER, 0);