Determine pixel-to-texel ratio for each sprite individually.

This fixes rendering artifacts when sprites are scaled > 1.
This commit is contained in:
Paul Chote
2024-10-29 21:50:47 +00:00
committed by Gustas
parent 42989c74aa
commit 09063d23da
4 changed files with 16 additions and 13 deletions

View File

@@ -674,9 +674,10 @@ namespace OpenRA.Platforms.Default
break;
}
// Core features are defined as the shared feature set of GL 3.2 and (GLES 3 + BGRA extension)
// Core features are defined as the shared feature set of GL 3.2 and (GLES 3 + derivatives, BGRA extensions)
var hasBGRA = SDL.SDL_GL_ExtensionSupported("GL_EXT_texture_format_BGRA8888") == SDL.SDL_bool.SDL_TRUE;
if (Version.Contains(" ES") && hasBGRA && major >= 3)
var hasDerivatives = SDL.SDL_GL_ExtensionSupported("GL_OES_standard_derivatives") == SDL.SDL_bool.SDL_TRUE;
if (Version.Contains(" ES") && hasBGRA && hasDerivatives && major >= 3)
{
hasValidConfiguration = true;
Profile = GLProfile.Embedded;