35 lines
783 B
C++
35 lines
783 B
C++
#pragma once
|
|
|
|
#undef min
|
|
#undef max
|
|
|
|
#include <Magnum/GL/AbstractShaderProgram.h>
|
|
#include <Magnum/GL/Shader.h>
|
|
#include <Magnum/GL/Version.h>
|
|
#include <Magnum/Math/Matrix4.h>
|
|
#include <glm/glm.hpp>
|
|
|
|
#define PROVINCES_SSBO_BINDING 0
|
|
#define CAMERA_UNIFORM 1
|
|
//TODO: push constant
|
|
#define TRANSFORM_UNIFORM 2
|
|
#define PROVINCES_ID_UNIFORM 3
|
|
|
|
using namespace Magnum;
|
|
|
|
class BaseMaterial : public GL::AbstractShaderProgram
|
|
{
|
|
public:
|
|
void setModelViewProjection(const Matrix4 &m, const Matrix4 &vp);
|
|
|
|
protected:
|
|
explicit BaseMaterial(const std::string &vertSrc, const std::string &fragSrc);
|
|
};
|
|
|
|
class ProvinceMaterial : public BaseMaterial
|
|
{
|
|
public:
|
|
explicit ProvinceMaterial(const std::string &vertSrc, const std::string &fragSrc);
|
|
|
|
void setId(const uint32_t &id);
|
|
}; |