Fix two trivial implicit double to int conversion warnings. NFC

This commit is contained in:
nabijaczleweli 2020-03-08 16:39:19 +01:00 committed by whitequark
parent c29624f4a1
commit 6017ecdacc

View File

@ -693,8 +693,8 @@ void OpenGl3Renderer::Clear() {
}
std::shared_ptr<Pixmap> OpenGl3Renderer::ReadFrame() {
int width = camera.width * camera.pixelRatio;
int height = camera.height * camera.pixelRatio;
int width = (int)(camera.width * camera.pixelRatio);
int height = (int)(camera.height * camera.pixelRatio);
std::shared_ptr<Pixmap> pixmap =
Pixmap::Create(Pixmap::Format::RGBA, (size_t)width, (size_t)height);
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &pixmap->data[0]);