Some example tweaks
This commit is contained in:
parent
6f7b721d81
commit
2edec8ae28
2 changed files with 16 additions and 4 deletions
|
@ -18,6 +18,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
|
||||
|
@ -37,7 +43,7 @@ int main()
|
|||
|
||||
// Load raymarching shader
|
||||
// NOTE: Defining 0 (NULL) for vertex shader forces usage of internal default vertex shader
|
||||
Shader shader = LoadShader(0, "resources/shaders/glsl330/raymarching.fs");
|
||||
Shader shader = LoadShader(0, FormatText("resources/shaders/glsl%i/raymarching.fs", GLSL_VERSION));
|
||||
|
||||
// Get shader locations for required uniforms
|
||||
int viewEyeLoc = GetShaderLocation(shader, "viewEye");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue