7cbe8acf30
Now the code is being compiled through .lib files!
36 lines
718 B
C++
36 lines
718 B
C++
#pragma once
|
|
|
|
#include <charcoal/VertexFragmentShaderProgram.h>
|
|
#include <charcoal/Shader.h>
|
|
#include <charcoal/Mesh.h>
|
|
#include <charcoal/Renderable.h>
|
|
|
|
using namespace charcoal;
|
|
|
|
class MySimpleShaderProgram : 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;
|
|
|
|
MySimpleShaderProgram() : VertexFragmentShaderProgram(SHADER_PATH "MySimpleVS.glsl", SHADER_PATH "MySimpleFS.glsl") {}
|
|
};
|