From 3dbf5028eec53f661a018ddbd969bd26aa7748b5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 3 Mar 2021 00:20:21 +0000 Subject: Create and use a shader program for things with absolute position Rails in this case. --- gfx/gl/shader.cpp | 4 ++++ gfx/gl/shader.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gfx/gl') diff --git a/gfx/gl/shader.cpp b/gfx/gl/shader.cpp index 3021257..b97d6fc 100644 --- a/gfx/gl/shader.cpp +++ b/gfx/gl/shader.cpp @@ -45,6 +45,10 @@ Shader::Shader() : { landmassShader_vs.compile(), landmassShader_fs.compile(), + }, + { + landmassShader_vs.compile(), + basicShader_fs.compile(), }}} { } diff --git a/gfx/gl/shader.h b/gfx/gl/shader.h index f1fe705..8b18e99 100644 --- a/gfx/gl/shader.h +++ b/gfx/gl/shader.h @@ -11,7 +11,7 @@ class Location; class Shader { public: - enum class Program { Basic = 0, Water = 1, LandMass = 2 }; + enum class Program { Basic = 0, Water = 1, LandMass = 2, StaticPos = 3 }; Shader(); @@ -31,7 +31,7 @@ private: GLint viewProjection_uniform, model_uniform; }; - std::array programs; + std::array programs; }; #endif -- cgit v1.2.3