diff options
author | Michael Pavone <pavone@retrodev.com> | 2018-03-25 10:47:48 -0700 |
---|---|---|
committer | Michael Pavone <pavone@retrodev.com> | 2018-03-25 10:47:48 -0700 |
commit | d38cce4406eca4d0505f3d5103e4a003aca44045 (patch) | |
tree | 21055a7d6cec402c3258b0829fc526c70d2ba24b | |
parent | 6b875d84af9974cc92f7b0631207c31273381c47 (diff) |
Don't try to use GLES specific stuff unless we're actualy on a GLES platform
--HG--
branch : nuklear_ui
-rw-r--r-- | nuklear_ui/nuklear_sdl_gles2.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/nuklear_ui/nuklear_sdl_gles2.h b/nuklear_ui/nuklear_sdl_gles2.h index e22ec1d..c727f31 100644 --- a/nuklear_ui/nuklear_sdl_gles2.h +++ b/nuklear_ui/nuklear_sdl_gles2.h @@ -73,8 +73,13 @@ static struct nk_sdl { 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 @@ nk_sdl_device_create(void) "}\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" |