summaryrefslogtreecommitdiffhomepage
path: root/examples/text/text_font_sdf.c
diff options
context:
space:
mode:
authorRay <[email protected]>2019-05-17 01:17:40 +0200
committerRay <[email protected]>2019-05-17 01:17:40 +0200
commit970f1e8ff15424ca2d96d89bf2871f0246835e9b (patch)
treebc093a8eaee29739e52642c233d0f9102e9db7cf /examples/text/text_font_sdf.c
parentce87d2ced4dbe60f97d3ed48635231c222482b18 (diff)
downloadraylib-970f1e8ff15424ca2d96d89bf2871f0246835e9b.tar.gz
raylib-970f1e8ff15424ca2d96d89bf2871f0246835e9b.zip
examples review
Diffstat (limited to 'examples/text/text_font_sdf.c')
-rw-r--r--examples/text/text_font_sdf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/text/text_font_sdf.c b/examples/text/text_font_sdf.c
index 755b642d..69cff471 100644
--- a/examples/text/text_font_sdf.c
+++ b/examples/text/text_font_sdf.c
@@ -11,6 +11,12 @@
#include "raylib.h"
+#if defined(PLATFORM_DESKTOP)
+ #define GLSL_VERSION 330
+#else // PLATFORM_RPI, PLATFORM_ANDROID, PLATFORM_WEB
+ #define GLSL_VERSION 100
+#endif
+
int main()
{
// Initialization
@@ -47,7 +53,7 @@ int main()
UnloadImage(atlas);
// Load SDF required shader (we use default vertex shader)
- Shader shader = LoadShader(0, "resources/shaders/sdf.fs");
+ Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/sdf.fs", GLSL_VERSION));
SetTextureFilter(fontSDF.texture, FILTER_BILINEAR); // Required for SDF font
Vector2 fontPosition = { 40, screenHeight/2 - 50 };