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