try to fix iOS black frames recording

This commit is contained in:
2018-04-20 18:04:06 +02:00
parent aef4cc2230
commit af0e588a94

View File

@@ -354,7 +354,11 @@ void App::update(float dt)
rec_timer = 0.f;
auto data = new uint8_t[width * height * 4];
glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
#if __IOS__
[ios_view->glview bindDrawable];
#else
glBindFramebuffer(GL_FRAMEBUFFER, 0);
#endif
glReadBuffer(GL_BACK);
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
{