- Migrated to C++20 modules - Worker and ThreadedWorker base classes for interthread systems - Client class for server transport and converting game data models to render data (views) - Update provinces render data from Client - Renderer handles commands now
43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
module;
|
|
|
|
#define NOMINMAX
|
|
|
|
#include <Magnum/GL/AbstractShaderProgram.h>
|
|
#include <Magnum/GL/Shader.h>
|
|
#include <Magnum/GL/Version.h>
|
|
#include <Magnum/Math/Matrix4.h>
|
|
#include <string>
|
|
#include <cstdint>
|
|
|
|
export module Materials;
|
|
|
|
using namespace Magnum;
|
|
|
|
export namespace ee_magnum
|
|
{
|
|
class BaseMaterial : public GL::AbstractShaderProgram
|
|
{
|
|
public:
|
|
inline static constexpr std::int32_t CAMERA_BINDING = 1;
|
|
//TODO: push constant
|
|
inline static constexpr std::int32_t TRANSFORM_BINDING = 2;
|
|
|
|
void setModel(const Matrix4 &model);
|
|
void setViewProjection(const Matrix4 &vewProjection);
|
|
|
|
protected:
|
|
explicit BaseMaterial(const std::string &vertSrc, const std::string &fragSrc);
|
|
};
|
|
|
|
class ProvinceMaterial : public BaseMaterial
|
|
{
|
|
public:
|
|
inline static constexpr std::int32_t PROVINCES_DATA_BINDING = 0;
|
|
inline static constexpr std::int32_t PROVINCES_ID_BINDING = 3;
|
|
|
|
explicit ProvinceMaterial(const std::string &vertSrc, const std::string &fragSrc);
|
|
|
|
void setId(const std::uint32_t &id);
|
|
};
|
|
}
|