Mercurial > repos > blastem
changeset 1538:b581663c42ec nuklear_ui
Don't try to use GLES specific stuff unless we're actualy on a GLES platform
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 25 Mar 2018 10:47:48 -0700 |
parents | b4914d92308b |
children | 5b1157eb189d |
files | nuklear_ui/nuklear_sdl_gles2.h |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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"