made a copy of shader called ourShader because Shader is ambigious
This commit is contained in:
parent
33b6e10b32
commit
0ce6a0cfdc
17
ourShader.cc
Normal file
17
ourShader.cc
Normal file
@ -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;
|
||||
}
|
18
ourShader.hh
Normal file
18
ourShader.hh
Normal file
@ -0,0 +1,18 @@
|
||||
#ifndef SHADER_HH_INCLUDED
|
||||
#define SHADER_HH_INCLUDED
|
||||
|
||||
#include "model.hh"
|
||||
#include <string>
|
||||
#include <ACGL/OpenGL/Creator/ShaderProgramCreator.hh>
|
||||
|
||||
class OurShader {
|
||||
public:
|
||||
OurShader(std::string filePath, Model model);
|
||||
OurShader();
|
||||
ACGL::OpenGL::SharedShaderProgram getReference();
|
||||
~OurShader();
|
||||
private:
|
||||
ACGL::OpenGL::SharedShaderProgram reference;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user