Skip to content

render/gles2: do not set GL_TEXTURE_MAG_FILTER

Ronan Pigott requested to merge github/fork/RPigott/mag_filter into master

My take on #1770 (closed) As @emersion says this comment

Hmm, I'm really not a fan of adding get_scale/set_scale to the renderer. I'd rather manually call glTexParameteri in the compositor before rendering a texture.

I found in the reference:

GL_TEXTURE_MAG_FILTER The texture magnification function is used when the pixel being textured maps to an area less than or equal to one texture element. [...] The initial value of GL_TEXTURE_MAG_FILTER is GL_LINEAR.

Since it just so happens that GL_LINEAR is the default value, my idea is to just not set MAG_FILTER at all in wlroots, and let it remain the default value. It shouldn't cause any change in behavior, but will allow compositors to set the value before rendering if they like.

I'll go ahead and post a POC sway patch that does just this. I'm not sure if the implementation is the best approach for sway, but it does appear to work for me. What do you think?

Merge request reports