5db5ce971c
Also added a copy pre-build even for .h files into the include directory for charcoal and charcoal-builtin
35 lines
677 B
C++
35 lines
677 B
C++
#pragma once
|
|
|
|
#include "VertexFragmentShaderProgram.h"
|
|
#include "Shader.h"
|
|
#include "Mesh.h"
|
|
#include "Renderable.h"
|
|
|
|
using namespace charcoal;
|
|
|
|
class MyBasicShaderProgram : public VertexFragmentShaderProgram
|
|
{
|
|
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 RenderableT<Vertex, Index> RenderableT;
|
|
typedef Mesh<Vertex, Index> Mesh;
|
|
|
|
MyBasicShaderProgram() : VertexFragmentShaderProgram(SHADER_PATH "MyBasicVS.glsl", SHADER_PATH "MyBasicFS.glsl") {}
|
|
}; |