From 22b12e3013adf66b462b174688f82bd53ba8e721 Mon Sep 17 00:00:00 2001 From: davc0n Date: Thu, 8 May 2025 00:07:35 +0200 Subject: refactor: cshader class to sshader struct (#10324) --- src/render/OpenGL.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/render/OpenGL.cpp') diff --git a/src/render/OpenGL.cpp b/src/render/OpenGL.cpp index 6a568ed8..f073165d 100644 --- a/src/render/OpenGL.cpp +++ b/src/render/OpenGL.cpp @@ -906,7 +906,7 @@ static std::string processShader(const std::string& filename, const std::map tex, const CBox& box, static std::map, std::array> primariesConversionCache; -void CHyprOpenGLImpl::passCMUniforms(const CShader& shader, const NColorManagement::SImageDescription& imageDescription, +void CHyprOpenGLImpl::passCMUniforms(const SShader& shader, const NColorManagement::SImageDescription& imageDescription, const NColorManagement::SImageDescription& targetImageDescription, bool modifySDR) { glUniform1i(shader.sourceTF, imageDescription.transferFunction); glUniform1i(shader.targetTF, targetImageDescription.transferFunction); @@ -1487,7 +1487,7 @@ void CHyprOpenGLImpl::passCMUniforms(const CShader& shader, const NColorManageme glUniformMatrix3fv(shader.convertMatrix, 1, false, &primariesConversionCache[cacheKey][0]); } -void CHyprOpenGLImpl::passCMUniforms(const CShader& shader, const SImageDescription& imageDescription) { +void CHyprOpenGLImpl::passCMUniforms(const SShader& shader, const SImageDescription& imageDescription) { passCMUniforms(shader, imageDescription, m_renderData.pMonitor->m_imageDescription, true); } @@ -1519,7 +1519,7 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(SP tex, const CB Mat3x3 matrix = m_renderData.monitorProjection.projectBox(newBox, TRANSFORM, newBox.rot); Mat3x3 glMatrix = m_renderData.projection.copy().multiply(matrix); - CShader* shader = nullptr; + SShader* shader = nullptr; bool usingFinalShader = false; @@ -1716,7 +1716,7 @@ void CHyprOpenGLImpl::renderTexturePrimitive(SP tex, const CBox& box) Mat3x3 matrix = m_renderData.monitorProjection.projectBox(newBox, TRANSFORM, newBox.rot); Mat3x3 glMatrix = m_renderData.projection.copy().multiply(matrix); - CShader* shader = &m_shaders->m_shPASSTHRURGBA; + SShader* shader = &m_shaders->m_shPASSTHRURGBA; glActiveTexture(GL_TEXTURE0); glBindTexture(tex->m_target, tex->m_texID); @@ -1767,7 +1767,7 @@ void CHyprOpenGLImpl::renderTextureMatte(SP tex, const CBox& box, CFra Mat3x3 matrix = m_renderData.monitorProjection.projectBox(newBox, TRANSFORM, newBox.rot); Mat3x3 glMatrix = m_renderData.projection.copy().multiply(matrix); - CShader* shader = &m_shaders->m_shMATTE; + SShader* shader = &m_shaders->m_shMATTE; glUseProgram(shader->program); @@ -1912,7 +1912,7 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, CRegion* o } // declare the draw func - auto drawPass = [&](CShader* pShader, CRegion* pDamage) { + auto drawPass = [&](SShader* pShader, CRegion* pDamage) { if (currentRenderToFB == PMIRRORFB) PMIRRORSWAPFB->bind(); else -- cgit v1.2.3