diff --git a/src/pc/gfx/gfx_opengl.c b/src/pc/gfx/gfx_opengl.c index c0ff1aac..c8ef6b81 100644 --- a/src/pc/gfx/gfx_opengl.c +++ b/src/pc/gfx/gfx_opengl.c @@ -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]) {