From 1106022774b661def9607c5f2c96d18941dfafe6 Mon Sep 17 00:00:00 2001 From: TobyAdd <66429886+TobyAdd@users.noreply.github.com> Date: Thu, 5 Dec 2024 17:40:31 +0200 Subject: [PATCH] _-_ --- src/recorder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index 8f1bdf8..feb56cb 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -43,6 +43,7 @@ void glViewportHook(GLint a, GLint b, GLsizei c, GLsizei d) { #endif void RenderTexture::begin() { + #ifdef GEODE_IS_WINDOWS glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &oldFBO); texture = new cocos2d::CCTexture2D; @@ -64,10 +65,12 @@ void RenderTexture::begin() { texture->autorelease(); glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, oldRBO); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFBO); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFBO); + #endif } void RenderTexture::capture_frame(std::mutex& lock, std::vector& data, volatile bool& frame_has_data) { + #ifdef GEODE_IS_WINDOWS auto& recorder = Recorder::get(); glViewport(0, 0, width, height); @@ -89,6 +92,7 @@ void RenderTexture::capture_frame(std::mutex& lock, std::vector& data, glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, oldFBO); director->setViewport(); + #endif } void RenderTexture::end() {