2018-09-05 02:49:02 -04:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-11 01:26:24 -04:00
|
|
|
#include <charcoal/VertexFragmentShaderProgram.h>
|
|
|
|
#include <charcoal/Shader.h>
|
|
|
|
#include <charcoal/Mesh.h>
|
|
|
|
#include <charcoal/Renderable.h>
|
2018-09-05 02:49:02 -04:00
|
|
|
|
2018-09-12 17:03:46 -04:00
|
|
|
using namespace charcoal;
|
|
|
|
|
2018-09-13 00:51:47 -04:00
|
|
|
class MySimpleShaderProgram : public VertexFragmentShaderProgram
|
2018-09-05 02:49:02 -04:00
|
|
|
{
|
|
|
|
public:
|
2018-09-07 11:45:32 -04:00
|
|
|
struct Vertex
|
2018-09-05 02:49:02 -04:00
|
|
|
{
|
2018-09-07 11:45:32 -04:00
|
|
|
Vertex() {}
|
|
|
|
Vertex(float x, float y, float z)
|
2018-09-05 19:10:38 -04:00
|
|
|
: x(x), y(y), z(z)
|
2018-09-11 01:18:17 -04:00
|
|
|
{}
|
2018-09-05 02:49:02 -04:00
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
};
|
2018-09-11 01:18:17 -04:00
|
|
|
struct Color
|
2018-09-06 23:22:40 -04:00
|
|
|
{
|
2018-09-11 01:18:17 -04:00
|
|
|
float r = 0.0f;
|
|
|
|
float g = 0.0f;
|
|
|
|
float b = 0.0f;
|
|
|
|
float a = 1.0f;
|
2018-09-06 23:22:40 -04:00
|
|
|
};
|
2018-09-07 11:45:32 -04:00
|
|
|
typedef unsigned int Index;
|
2018-09-19 03:52:42 -04:00
|
|
|
typedef RenderableT<Vertex, Index> RenderableT;
|
2018-09-07 11:45:32 -04:00
|
|
|
typedef Mesh<Vertex, Index> Mesh;
|
2018-09-05 11:47:09 -04:00
|
|
|
|
2018-09-13 00:51:47 -04:00
|
|
|
MySimpleShaderProgram() : VertexFragmentShaderProgram(SHADER_PATH "MySimpleVS.glsl", SHADER_PATH "MySimpleFS.glsl") {}
|
2018-09-11 01:18:17 -04:00
|
|
|
};
|