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:
parent
bcb34275ea
commit
c8b5023bb0
2 changed files with 7 additions and 4 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue