From 1beeac545dded81e1672e756838fedf75cbee44c Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Tue, 20 Nov 2018 22:34:01 +1100 Subject: [PATCH] [client] added missing lg-fonts.c to the repo --- client/lg-fonts.c | 31 +++++++++++++++++++++++++++++ client/renderers/egl_shader_progs.h | 24 ++++++++++------------ 2 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 client/lg-fonts.c diff --git a/client/lg-fonts.c b/client/lg-fonts.c new file mode 100644 index 00000000..37b94656 --- /dev/null +++ b/client/lg-fonts.c @@ -0,0 +1,31 @@ +/* +Looking Glass - KVM FrameRelay (KVMFR) Client +Copyright (C) 2017 Geoffrey McRae +https://looking-glass.hostfission.com + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +#include "lg-fonts.h" +#include + +extern const LG_Font LGF_SDL; + +const LG_Font * LG_Fonts[] = +{ + &LGF_SDL, + NULL // end of array sentinal +}; + +#define LG_FONT_COUNT ((sizeof(LG_Fonts) / sizeof(LG_Font *)) - 1) \ No newline at end of file diff --git a/client/renderers/egl_shader_progs.h b/client/renderers/egl_shader_progs.h index 0e51a22d..528d0529 100644 --- a/client/renderers/egl_shader_progs.h +++ b/client/renderers/egl_shader_progs.h @@ -188,20 +188,16 @@ uniform sampler2D sampler1;\ void main()\ {\ highp vec4 tmp = texture(sampler1, uv);\ - if (tmp.a == 0.0) \ - { \ - color.r = 0.0;\ - color.g = 0.0;\ - color.b = 1.0;\ - color.a = 0.5;\ - } \ - else \ - { \ - color.r = tmp.b;\ - color.g = tmp.g;\ - color.b = tmp.r;\ - color.a = tmp.a;\ - } \ + color.r = tmp.b; \ + color.g = tmp.g; \ + color.b = tmp.r; \ + color.a = tmp.a; \ + if (color.a == 0.0) \ + {\ + color.a = 0.5; \ + color.r = 0.0; \ + color.g = 0.0; \ + }\ }\ ";