Skip to content

Commit

Permalink
Use glDrawBuffers instead of glDrawBuffer with GLES.
Browse files Browse the repository at this point in the history
  • Loading branch information
kblaschke committed Jul 24, 2023
1 parent 5154f1c commit daf7bff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libprojectM/MilkdropPreset/MilkdropPreset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ void MilkdropPreset::RenderFrame(const libprojectM::Audio::FrameAudioData& audio
m_framebuffer.BindRead(m_previousFrameBuffer);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0);
glReadBuffer(GL_COLOR_ATTACHMENT0);
#if USE_GLES
{
GLenum drawBuffers[] = { GL_COLOR_ATTACHMENT0 };
glDrawBuffers(1, drawBuffers)
}
#else
glDrawBuffer(GL_COLOR_ATTACHMENT0);
#endif
glBlitFramebuffer(0, 0, renderContext.viewportSizeX, renderContext.viewportSizeY,
0, 0, renderContext.viewportSizeX, renderContext.viewportSizeY,
GL_COLOR_BUFFER_BIT, GL_NEAREST);
Expand Down

0 comments on commit daf7bff

Please sign in to comment.