Skip to content

Commit

Permalink
Provides shader version.
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumeblanc committed Feb 11, 2024
1 parent 7422339 commit 0f1e2e2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions samples/framework/internal/shader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {}
Expand Down

0 comments on commit 0f1e2e2

Please sign in to comment.