Remove strict aliasing warning in opengles2 backend

This commit is contained in:
Sylvain 2021-12-11 20:04:53 +01:00
parent 3e43d6e34b
commit d7f66ba1ec
No known key found for this signature in database
GPG Key ID: 5F87E02E5BC0939E
1 changed files with 2 additions and 2 deletions

View File

@ -480,7 +480,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t
{ {
GLuint id; GLuint id;
GLint compileSuccessful = GL_FALSE; GLint compileSuccessful = GL_FALSE;
const Uint8 *shader_src = GLES2_GetShader(type); const char *shader_src = (char *)GLES2_GetShader(type);
if (!shader_src) { if (!shader_src) {
SDL_SetError("No shader src"); SDL_SetError("No shader src");
@ -489,7 +489,7 @@ GLES2_CacheShader(GLES2_RenderData *data, GLES2_ShaderType type, GLenum shader_t
/* Compile */ /* Compile */
id = data->glCreateShader(shader_type); id = data->glCreateShader(shader_type);
data->glShaderSource(id, 1, (const char**)&shader_src, NULL); data->glShaderSource(id, 1, &shader_src, NULL);
data->glCompileShader(id); data->glCompileShader(id);
data->glGetShaderiv(id, GL_COMPILE_STATUS, &compileSuccessful); data->glGetShaderiv(id, GL_COMPILE_STATUS, &compileSuccessful);