diff --git a/src/render/rendergl3.cpp b/src/render/rendergl3.cpp index 167ce035..ce201aca 100644 --- a/src/render/rendergl3.cpp +++ b/src/render/rendergl3.cpp @@ -680,9 +680,10 @@ void OpenGl3Renderer::Clear() { std::shared_ptr OpenGl3Renderer::ReadFrame() { std::shared_ptr pixmap = - Pixmap::Create(Pixmap::Format::RGB, (size_t)camera.width, (size_t)camera.height); + Pixmap::Create(Pixmap::Format::RGBA, (size_t)camera.width, (size_t)camera.height); glReadPixels(0, 0, (int)camera.width, (int)camera.height, - GL_RGB, GL_UNSIGNED_BYTE, &pixmap->data[0]); + GL_RGBA, GL_UNSIGNED_BYTE, &pixmap->data[0]); + ssassert(glGetError() == GL_NO_ERROR, "Unexpected glReadPixels error"); return pixmap; }