try to fix iOS black frames recording
This commit is contained in:
@@ -354,7 +354,11 @@ void App::update(float dt)
|
|||||||
rec_timer = 0.f;
|
rec_timer = 0.f;
|
||||||
|
|
||||||
auto data = new uint8_t[width * height * 4];
|
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);
|
glReadBuffer(GL_BACK);
|
||||||
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, data);
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user