27 lines
635 B
C++
27 lines
635 B
C++
#ifndef OPENGLGRAPHICS_H
|
|
#define OPENGLGRAPHICS_H
|
|
|
|
#include <string>
|
|
#include <epoxy/gl.h>
|
|
#include <opengl-playground/openglshader.hpp>
|
|
#include <glm/glm.hpp>
|
|
#include <memory>
|
|
|
|
class OpenGlGraphics
|
|
{
|
|
public:
|
|
OpenGlGraphics(std::shared_ptr<OpenGlShaderProgram> shader_prog);
|
|
~OpenGlGraphics();
|
|
virtual void realize() = 0;
|
|
virtual void render() = 0;
|
|
void setModelMatrix(const glm::mat4 &model_matrix);
|
|
const glm::mat4 &getModelMatrix();
|
|
const glm::mat3 &getNormalMatrix();
|
|
protected:
|
|
std::shared_ptr<OpenGlShaderProgram> shaderprog;
|
|
glm::mat4 model_matrix;
|
|
glm::mat3 normal_matrix;
|
|
};
|
|
|
|
#endif // OPENGLGRAPHICS_H
|