diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-06-09 22:11:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-06-10 12:56:53 +0300 |
commit | 61e9fc59323157bbd3ea024e816981b975d5b2c8 (patch) | |
tree | aec9ac4d650b2949cde80a65d021ac7ab39a2fc9 /src/render/shaders | |
parent | 5fe5d3de3c570734d824afac4992a0d00386dbea (diff) | |
download | plus-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.gz plus-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.bz2 plus-61e9fc59323157bbd3ea024e816981b975d5b2c8.tar.xz plus-61e9fc59323157bbd3ea024e816981b975d5b2c8.zip |
Add basic texture drawing in modernopengl.
Diffstat (limited to 'src/render/shaders')
-rw-r--r-- | src/render/shaders/shadersmanager.cpp | 7 | ||||
-rw-r--r-- | src/render/shaders/shadersmanager.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/render/shaders/shadersmanager.cpp b/src/render/shaders/shadersmanager.cpp index f9c305d79..8a1072deb 100644 --- a/src/render/shaders/shadersmanager.cpp +++ b/src/render/shaders/shadersmanager.cpp @@ -118,4 +118,11 @@ ShaderProgram *ShadersManager::getSimpleProgram() return createProgram(dir + paths.getStringValue("simpleVertexShader"), dir + paths.getStringValue("simpleFragmentShader")); } + +ShaderProgram *ShadersManager::getTextureProgram() +{ + const std::string dir = paths.getStringValue("shaders"); + return createProgram(dir + paths.getStringValue("textureVertexShader"), + dir + paths.getStringValue("textureFragmentShader")); +} #endif diff --git a/src/render/shaders/shadersmanager.h b/src/render/shaders/shadersmanager.h index 50e714aba..b525d18e1 100644 --- a/src/render/shaders/shadersmanager.h +++ b/src/render/shaders/shadersmanager.h @@ -41,6 +41,8 @@ class ShadersManager final A_WARN_UNUSED; ShaderProgram *getSimpleProgram(); + + ShaderProgram *getTextureProgram(); }; extern ShadersManager shaders; |