use #version 120 on desktop GL
This commit is contained in:
parent
fbbb3cba5c
commit
735d032bdd
|
@ -213,10 +213,10 @@ static struct ShaderProgram *gfx_opengl_create_and_load_new_shader(uint32_t shad
|
||||||
size_t num_floats = 4;
|
size_t num_floats = 4;
|
||||||
|
|
||||||
// Vertex shader
|
// Vertex shader
|
||||||
#ifdef OSX_BUILD
|
#ifdef USE_GLES
|
||||||
append_line(vs_buf, &vs_len, "");
|
|
||||||
#else
|
|
||||||
append_line(vs_buf, &vs_len, "#version 100");
|
append_line(vs_buf, &vs_len, "#version 100");
|
||||||
|
#else
|
||||||
|
append_line(vs_buf, &vs_len, "#version 120");
|
||||||
#endif
|
#endif
|
||||||
append_line(vs_buf, &vs_len, "attribute vec4 aVtxPos;");
|
append_line(vs_buf, &vs_len, "attribute vec4 aVtxPos;");
|
||||||
if (used_textures[0] || used_textures[1]) {
|
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, "}");
|
append_line(vs_buf, &vs_len, "}");
|
||||||
|
|
||||||
// Fragment shader
|
// Fragment shader
|
||||||
#ifdef OSX_BUILD
|
#ifdef USE_GLES
|
||||||
append_line(fs_buf, &fs_len, "");
|
|
||||||
#else
|
|
||||||
append_line(fs_buf, &fs_len, "#version 100");
|
append_line(fs_buf, &fs_len, "#version 100");
|
||||||
append_line(fs_buf, &fs_len, "precision mediump float;");
|
append_line(fs_buf, &fs_len, "precision mediump float;");
|
||||||
|
#else
|
||||||
|
append_line(fs_buf, &fs_len, "#version 120");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (used_textures[0] || used_textures[1]) {
|
if (used_textures[0] || used_textures[1]) {
|
||||||
|
|
Loading…
Reference in New Issue