You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When dealing with polygon that are more larger than the actual texture, the default behaviour of SFML is to clamp pixels to the edge.
This is not ideal if you work on a method with light and a visibility polygon for example.
I'm not a GL expert but I've had a quick look through the GL docs and extension registry, and I don't believe this feature can be implementedwithout bumping the OpenGL ES version. The required extensions - GL_EXT_texture_border_clamp, GL_OES_texture_border_clamp, or GL_NV_texture_border_clamp - were added with GL ES 3.0.
Provided that you're only supporting GL 1.0+ and GL ES 3.0+, it's very much possible to implement this behaviour yourself by mixing SFML with OpenGL code (albeit you would likely have to generate a custom glad/gl.h file) but I don't believe this is something that can be implemented in SFML whilst legacy hardware support is trying to be maintained
I think we can provide a method to enable GL_CLAMP_TO_BORDER and check if the extension is available. We can simply return a boolean to notice the user if the feature have been correctly added.
it's very much possible to implement this behaviour yourself by mixing SFML with OpenGL code
I mean yes, but SFML is made for simplicity and providing some great feature like this easily is pretty cool especially if you are a beginner (although I'm not sure a beginner will use this :) ).
Provided that you're only supporting GL 1.0+ and GL ES 3.0+
I'm pretty sure that a majority of system (maybe not with ES) have that feature available today. Like I say up there, if the feature is not here, just simply ignore the change and provide the user a negative response.
Subject of the issue
When dealing with polygon that are more larger than the actual texture, the default behaviour of SFML is to clamp pixels to the edge.
This is not ideal if you work on a method with light and a visibility polygon for example.
More information here :
https://learnopengl.com/Getting-started/Textures
I think this can be an great addition on the texture class.
The text was updated successfully, but these errors were encountered: