opengl: allow texture filter to be changed (#13078)

* opengl: allow texture filter to be changed

* format

* correct filter

* Moved from OpenGL.hpp to Texture.hpp

* Shortened names
This commit is contained in:
jmanc3 2026-01-27 15:21:53 -06:00 committed by GitHub
parent bcb34275ea
commit c8b5023bb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -1363,8 +1363,8 @@ void CHyprOpenGLImpl::renderTextureInternal(SP<CTexture> tex, const CBox& box, c
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
} else {
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, GL_LINEAR);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, GL_LINEAR);
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, tex->magFilter);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, tex->minFilter);
}
const bool isHDRSurface = m_renderData.surface.valid() && m_renderData.surface->m_colorManagement.valid() ? m_renderData.surface->m_colorManagement->isHDR() : false;
@ -1616,8 +1616,8 @@ void CHyprOpenGLImpl::renderTexturePrimitive(SP<CTexture> tex, const CBox& box)
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, GL_NEAREST);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, GL_NEAREST);
} else {
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, GL_LINEAR);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, GL_LINEAR);
tex->setTexParameter(GL_TEXTURE_MAG_FILTER, tex->magFilter);
tex->setTexParameter(GL_TEXTURE_MIN_FILTER, tex->minFilter);
}
auto shader = useShader(m_shaders->frag[SH_FRAG_PASSTHRURGBA]);