40 lines
620 B
C++
40 lines
620 B
C++
#pragma once
|
|
|
|
#include "ShaderProgram.h"
|
|
#include "Shader.h"
|
|
#include "Mesh.h"
|
|
#include "Renderable.h"
|
|
|
|
using namespace charcoal;
|
|
|
|
class MySimpleShaderProgram : public ShaderProgram
|
|
{
|
|
public:
|
|
struct Vertex
|
|
{
|
|
Vertex() {}
|
|
Vertex(float x, float y, float z)
|
|
: x(x), y(y), z(z)
|
|
{}
|
|
float x;
|
|
float y;
|
|
float z;
|
|
};
|
|
struct Color
|
|
{
|
|
float r = 0.0f;
|
|
float g = 0.0f;
|
|
float b = 0.0f;
|
|
float a = 1.0f;
|
|
};
|
|
typedef unsigned int Index;
|
|
typedef Renderable<Vertex, Index> Renderable;
|
|
typedef Mesh<Vertex, Index> Mesh;
|
|
|
|
MySimpleShaderProgram();
|
|
|
|
private:
|
|
Shader m_vertex_shader;
|
|
Shader m_fragment_shader;
|
|
};
|