diff options
| author | Ray <[email protected]> | 2019-05-18 01:27:54 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2019-05-18 01:27:54 +0200 |
| commit | 210d5ec72bbc4ba426b21f69e6f65b6d75923d05 (patch) | |
| tree | c01f6e14d673504534602c7ae9609b3dff248806 /examples/src/text | |
| parent | 85b11a6baf64a2b4e02c81d4d47b15eb578dc074 (diff) | |
| download | raylib.com-210d5ec72bbc4ba426b21f69e6f65b6d75923d05.tar.gz raylib.com-210d5ec72bbc4ba426b21f69e6f65b6d75923d05.zip | |
Update examples to raylib 2.5 -WIP-
Remove old examples
Diffstat (limited to 'examples/src/text')
| -rw-r--r-- | examples/src/text/text_font_sdf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/examples/src/text/text_font_sdf.c b/examples/src/text/text_font_sdf.c index 755b642..69cff47 100644 --- a/examples/src/text/text_font_sdf.c +++ b/examples/src/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 }; |
