charcoal/OpenGLEngine/MyBasicShaderProgram.h

37 lines
590 B
C
Raw Normal View History

2018-09-05 06:49:02 +00:00
#pragma once
#include "ShaderProgram.h"
#include "Shader.h"
#include "Mesh.h"
#include "Renderable.h"
2018-09-05 06:49:02 +00:00
2018-09-11 05:18:17 +00:00
class MyBasicShaderProgram : public ShaderProgram
2018-09-05 06:49:02 +00:00
{
public:
struct Vertex
2018-09-05 06:49:02 +00:00
{
Vertex() {}
Vertex(float x, float y, float z)
: 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-11 05:18:17 +00:00
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;
2018-09-11 05:18:17 +00:00
MyBasicShaderProgram();
2018-09-05 06:49:02 +00:00
private:
Shader m_vertex_shader;
Shader m_fragment_shader;
};