Merge pull request #73 from lvonasek/backport_alpha_fix

Clearing alpha channel of FBO fixes a few menu issues
This commit is contained in:
Simon 2022-05-01 17:24:23 +01:00 committed by GitHub
commit 0695c7ac76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -345,6 +345,12 @@ void VR_DrawFrame( engine_t* engine ) {
Com_Frame();
// Clear the alpha channel, other way VR API would not transfer the framebuffer fully
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_TRUE);
glClearColor(0.0, 0.0, 0.0, 1.0);
glClear(GL_COLOR_BUFFER_BIT);
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
engine->framebuffers.swapchainIndex = (engine->framebuffers.swapchainIndex + 1) %
engine->framebuffers.swapchainLength;