From 3f8b6b5c9534b70edd25ce90a6fcdb17dc498717 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 21 Feb 2024 22:30:37 +0000 Subject: [PATCH] framebuffer: ask for 2101010 by default --- src/renderer/Framebuffer.cpp | 4 ++-- src/renderer/Framebuffer.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/Framebuffer.cpp b/src/renderer/Framebuffer.cpp index d57fec5..cb5c618 100644 --- a/src/renderer/Framebuffer.cpp +++ b/src/renderer/Framebuffer.cpp @@ -17,10 +17,10 @@ static uint32_t glFormatToType(uint32_t gl) { return gl != GL_RGBA ? GL_UNSIGNED_INT_2_10_10_10_REV : GL_UNSIGNED_BYTE; } -bool CFramebuffer::alloc(int w, int h, uint32_t drmFormat) { +bool CFramebuffer::alloc(int w, int h) { bool firstAlloc = false; - uint32_t glFormat = drmFormatToGL(drmFormat); + uint32_t glFormat = drmFormatToGL(DRM_FORMAT_XRGB2101010); // TODO: revise only 10b when I find a way to figure out without sc whether display is 10b uint32_t glType = glFormatToType(glFormat); if (m_iFb == (uint32_t)-1) { diff --git a/src/renderer/Framebuffer.hpp b/src/renderer/Framebuffer.hpp index c9e28f0..76858fc 100644 --- a/src/renderer/Framebuffer.hpp +++ b/src/renderer/Framebuffer.hpp @@ -8,7 +8,7 @@ class CFramebuffer { public: ~CFramebuffer(); - bool alloc(int w, int h, uint32_t format = GL_RGBA); + bool alloc(int w, int h); void addStencil(); void bind() const; void release();