summaryrefslogtreecommitdiff
path: root/src/render/Texture.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-05-15 11:13:24 +0200
committerGitHub <noreply@github.com>2025-05-15 10:13:24 +0100
commit5ceb0ec15df6301cafe95a1b1f73b4f4bf255968 (patch)
tree80d14a0fd1edbdda851a9ecc6138e810d99179ad /src/render/Texture.cpp
parentf707d86912fa75c19920818321aec99d1f287c46 (diff)
core: drop the legacy renderer (#10408)
* core: drop the legacy renderer the legacy renderer is broken and barely used, drop it. * Nix: drop support for legacyRenderer --------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Diffstat (limited to 'src/render/Texture.cpp')
-rw-r--r--src/render/Texture.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/render/Texture.cpp b/src/render/Texture.cpp
index 74770cb9..52b79e8d 100644
--- a/src/render/Texture.cpp
+++ b/src/render/Texture.cpp
@@ -72,12 +72,12 @@ void CTexture::createFromShm(uint32_t drmFormat, uint8_t* pixels, uint32_t strid
GLCALL(glBindTexture(GL_TEXTURE_2D, m_texID));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
-#ifndef GLES2
+
if (format->flipRB) {
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_BLUE));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED));
}
-#endif
+
GLCALL(glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, stride / format->bytesPerBlock));
GLCALL(glTexImage2D(GL_TEXTURE_2D, 0, format->glInternalFormat ? format->glInternalFormat : format->glFormat, size_.x, size_.y, 0, format->glFormat, format->glType, pixels));
GLCALL(glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, 0));
@@ -120,12 +120,10 @@ void CTexture::update(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, cons
auto rects = damage.copy().intersect(CBox{{}, m_size}).getRects();
-#ifndef GLES2
if (format->flipRB) {
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_R, GL_BLUE));
GLCALL(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_B, GL_RED));
}
-#endif
for (auto const& rect : rects) {
GLCALL(glPixelStorei(GL_UNPACK_ROW_LENGTH_EXT, stride / format->bytesPerBlock));