From b97fd06f2ad8f62f179daef544dda1783252932b Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Thu, 2 Dec 2021 11:40:31 +0100 Subject: [PATCH] Bugfix Resolution frame buffer Set width to power of 2, needed for encoding (even if OpenGL accepts to display it) --- FrameBuffer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 38bb734..20ed12b 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -40,6 +40,7 @@ float FrameBuffer::resolution_height[5] = { 720.f, 1080.f, 1200.f, 1440.f, 2160. glm::vec3 FrameBuffer::getResolutionFromParameters(int ar, int h) { float width = aspect_ratio_size[ar].x * resolution_height[h] / aspect_ratio_size[ar].y; + width -= (int)width % 2; glm::vec3 res = glm::vec3( width, resolution_height[h] , 0.f); return res;