charcoal/OpenGLEngine/MyBasicShaderProgram.h
elipzer 991b52b233 Almost Finished Builtin
Builtin general structure created. Added a builtin::BasicScene
class for quick general testing of the engine on different systems.
The builtin::BasicScene class greatly reduces the amount of code
needed to be handled by the developer by offering a pre-made way
to handle it. It even includes pre-made shaders!
2018-09-13 00:51:47 -04:00

35 lines
675 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 Renderable<Vertex, Index> Renderable;
typedef Mesh<Vertex, Index> Mesh;
MyBasicShaderProgram() : VertexFragmentShaderProgram(SHADER_PATH "MyBasicVS.glsl", SHADER_PATH "MyBasicFS.glsl") {}
};