# HG changeset patch # User Michael Pavone # Date 1522000068 25200 # Node ID b581663c42ec79b9187513a618f36f732f852435 # Parent b4914d92308b4f193483f014b5624bd66b4564a4 Don't try to use GLES specific stuff unless we're actualy on a GLES platform diff -r b4914d92308b -r b581663c42ec nuklear_ui/nuklear_sdl_gles2.h --- a/nuklear_ui/nuklear_sdl_gles2.h Sun Mar 25 10:30:40 2018 -0700 +++ b/nuklear_ui/nuklear_sdl_gles2.h Sun Mar 25 10:47:48 2018 -0700 @@ -73,8 +73,13 @@ struct nk_font_atlas atlas; } sdl; - +#ifdef USE_GLES #define NK_SHADER_VERSION "#version 100\n" +#define DECLARE_PRECISION "precision mediump float;\n" +#else +#define NK_SHADER_VERSION "#version 110\n" +#define DECLARE_PRECISION +#endif NK_API void @@ -96,7 +101,7 @@ "}\n"; static const GLchar *fragment_shader = NK_SHADER_VERSION - "precision mediump float;\n" + DECLARE_PRECISION "uniform sampler2D Texture;\n" "varying vec2 Frag_UV;\n" "varying vec4 Frag_Color;\n"