Skip to content

Commit

Permalink
GL: Fix 16x resolution on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiaholmquist committed Jun 1, 2022
1 parent f85925f commit 35cbda9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/GPU_OpenGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 35cbda9

Please sign in to comment.