ngl: Compute correct renderformat

We want to round up, not down.
This commit is contained in:
Benjamin Otte 2021-10-08 02:31:25 +02:00
parent 4f53645e5d
commit 3b9967db48

View File

@ -4076,9 +4076,9 @@ get_framebuffer_format (guint framebuffer)
: GL_BACK,
GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, &size);
if (size >= 32)
if (size > 16)
return GL_RGBA32F;
else if (size >= 16)
else if (size > 8)
return GL_RGBA16F;
else
return GL_RGBA8;