mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Fixed OpenGLES shaders failing after renderer has been created
Cache all the shaders up front, so we can verify that they won't silently fail at runtime. If compiling the fragment shaders with the precision hint fails, try again without specifying precision. Fixes https://github.com/libsdl-org/SDL/issues/6166 Fixes https://github.com/libsdl-org/SDL/issues/6174
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
typedef enum
|
||||
{
|
||||
GLES2_SHADER_FRAGMENT_INCLUDE_NONE = 0,
|
||||
GLES2_SHADER_FRAGMENT_INCLUDE_DEFAULT,
|
||||
GLES2_SHADER_FRAGMENT_INCLUDE_BEST_TEXCOORD_PRECISION,
|
||||
GLES2_SHADER_FRAGMENT_INCLUDE_MEDIUM_TEXCOORD_PRECISION,
|
||||
GLES2_SHADER_FRAGMENT_INCLUDE_HIGH_TEXCOORD_PRECISION,
|
||||
@@ -61,8 +60,8 @@ typedef enum
|
||||
GLES2_SHADER_COUNT
|
||||
} GLES2_ShaderType;
|
||||
|
||||
const Uint8 *GLES2_GetShader(GLES2_ShaderType type);
|
||||
const Uint8 *GLES2_GetShaderInclude(GLES2_ShaderIncludeType type);
|
||||
const char *GLES2_GetShader(GLES2_ShaderType type);
|
||||
const char *GLES2_GetShaderInclude(GLES2_ShaderIncludeType type);
|
||||
GLES2_ShaderIncludeType GLES2_GetTexCoordPrecisionEnumFromHint(void);
|
||||
|
||||
#endif /* SDL_VIDEO_RENDER_OGL_ES2 */
|
||||
|
Reference in New Issue
Block a user