use #version 120 on desktop GL

This commit is contained in:
fgsfds 2020-06-10 00:56:10 +03:00
parent fbbb3cba5c
commit 735d032bdd
1 changed files with 6 additions and 6 deletions

View File

@ -213,10 +213,10 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad
size_t num_floats = 4;
// Vertex shader
#ifdef OSX_BUILD
append_line(vs_buf, &vs_len, "");
#else
#ifdef USE_GLES
append_line(vs_buf, &vs_len, "#version 100");
#else
append_line(vs_buf, &vs_len, "#version 120");
#endif
append_line(vs_buf, &vs_len, "attribute vec4 aVtxPos;");
if (used_textures[0] || used_textures[1]) {
@ -248,11 +248,11 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad
append_line(vs_buf, &vs_len, "}");
// Fragment shader
#ifdef OSX_BUILD
append_line(fs_buf, &fs_len, "");
#else
#ifdef USE_GLES
append_line(fs_buf, &fs_len, "#version 100");
append_line(fs_buf, &fs_len, "precision mediump float;");
#else
append_line(fs_buf, &fs_len, "#version 120");
#endif
if (used_textures[0] || used_textures[1]) {