From 0ce6a0cfdca5747bf86ea945c18c3c14c326f1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=BCndgens?= Date: Fri, 7 Nov 2014 16:47:11 +0100 Subject: [PATCH] made a copy of shader called ourShader because Shader is ambigious --- ourShader.cc | 17 +++++++++++++++++ ourShader.hh | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 ourShader.cc create mode 100644 ourShader.hh diff --git a/ourShader.cc b/ourShader.cc new file mode 100644 index 0000000..2dd64ce --- /dev/null +++ b/ourShader.cc @@ -0,0 +1,17 @@ +#include "ourShader.hh" + +OurShader::OurShader(std::string filePath, Model model) { + reference = ACGL::OpenGL::ShaderProgramCreator(filePath).attributeLocations( + model.getReference()->getAttributeLocations()).create(); + reference->use(); +} + +OurShader::OurShader() { +} + +OurShader::~OurShader() { +} + +ACGL::OpenGL::SharedShaderProgram OurShader::getReference() { + return reference; +} diff --git a/ourShader.hh b/ourShader.hh new file mode 100644 index 0000000..7779552 --- /dev/null +++ b/ourShader.hh @@ -0,0 +1,18 @@ +#ifndef SHADER_HH_INCLUDED +#define SHADER_HH_INCLUDED + +#include "model.hh" +#include +#include + +class OurShader { + public: + OurShader(std::string filePath, Model model); + OurShader(); + ACGL::OpenGL::SharedShaderProgram getReference(); + ~OurShader(); + private: + ACGL::OpenGL::SharedShaderProgram reference; +}; + +#endif