summaryrefslogtreecommitdiff
path: root/src/render/gl/GLTexture.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2026-04-05 20:37:07 +0200
committerGitHub <noreply@github.com>2026-04-05 19:37:07 +0100
commit809b9b9e78c69c53b62dfc7d5de5c20ff8fe0626 (patch)
treec54f0261aad8e01e9dc7abcfefafb056cd448ac3 /src/render/gl/GLTexture.cpp
parent5c5ba65ad32aa59c9e769d7b2ae62ea632d773f0 (diff)
egl: move over to use hyprgraphics (#12988)
use the hyprgraphics helpers instead.
Diffstat (limited to 'src/render/gl/GLTexture.cpp')
-rw-r--r--src/render/gl/GLTexture.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/render/gl/GLTexture.cpp b/src/render/gl/GLTexture.cpp
index d34bdb60..22bb8146 100644
--- a/src/render/gl/GLTexture.cpp
+++ b/src/render/gl/GLTexture.cpp
@@ -4,7 +4,9 @@
#include "../../helpers/Format.hpp"
#include "../Texture.hpp"
#include <cstring>
+#include <hyprgraphics/egl/Egl.hpp>
+using namespace Hyprgraphics::Egl;
using namespace Render::GL;
CGLTexture::CGLTexture(bool opaque) {
@@ -32,7 +34,7 @@ CGLTexture::CGLTexture(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, con
g_pHyprOpenGL->makeEGLCurrent();
- const auto format = NFormatUtils::getPixelFormatFromDRM(drmFormat);
+ const auto format = getPixelFormatFromDRM(drmFormat);
ASSERT(format);
m_type = format->withAlpha ? TEXTURE_RGBA : TEXTURE_RGBX;
@@ -70,7 +72,7 @@ CGLTexture::CGLTexture(const Aquamarine::SDMABUFAttrs& attrs, void* image, bool
return;
}
- m_opaque = NFormatUtils::isFormatOpaque(attrs.format);
+ m_opaque = isDrmFormatOpaque(attrs.format);
// #TODO external only formats should be external aswell.
// also needs a seperate color shader.
@@ -79,7 +81,7 @@ CGLTexture::CGLTexture(const Aquamarine::SDMABUFAttrs& attrs, void* image, bool
m_type = TEXTURE_EXTERNAL;
} else {*/
m_target = GL_TEXTURE_2D;
- m_type = NFormatUtils::isFormatOpaque(attrs.format) ? TEXTURE_RGBX : TEXTURE_RGBA;
+ m_type = isDrmFormatOpaque(attrs.format) ? TEXTURE_RGBX : TEXTURE_RGBA;
//}
allocate(attrs.size);
@@ -124,7 +126,7 @@ void CGLTexture::update(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, co
g_pHyprOpenGL->makeEGLCurrent();
- const auto format = NFormatUtils::getPixelFormatFromDRM(drmFormat);
+ const auto format = getPixelFormatFromDRM(drmFormat);
ASSERT(format);
bind();