diff options
Diffstat (limited to 'src/render/gl/GLTexture.cpp')
| -rw-r--r-- | src/render/gl/GLTexture.cpp | 10 |
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(); |
