From 0f1e2e2bf9486d791597a103f9a9b35d2ec00871 Mon Sep 17 00:00:00 2001 From: Guillaume Blanc Date: Sun, 11 Feb 2024 16:15:03 +0100 Subject: [PATCH] Provides shader version. --- samples/framework/internal/shader.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/framework/internal/shader.cc b/samples/framework/internal/shader.cc index 89085986c..3d5615bf5 100644 --- a/samples/framework/internal/shader.cc +++ b/samples/framework/internal/shader.cc @@ -42,11 +42,11 @@ namespace internal { #ifdef EMSCRIPTEN // WebGL requires to specify floating point precision -static const char* kPlatformSpecivicVSHeader = "precision mediump float;\n"; -static const char* kPlatformSpecivicFSHeader = "precision mediump float;\n"; +static const char* kPlatformSpecivicVSHeader = "#version 300 es\n precision mediump float;\n" +static const char* kPlatformSpecivicFSHeader = "#version 300 es\n precision mediump float;\n" #else // EMSCRIPTEN -static const char* kPlatformSpecivicVSHeader = ""; -static const char* kPlatformSpecivicFSHeader = ""; +static const char* kPlatformSpecivicVSHeader = "#version 330\n"; +static const char* kPlatformSpecivicFSHeader = "#version 330\n"; #endif // EMSCRIPTEN Shader::Shader() : program_(0), vertex_(0), fragment_(0) {}