charcoal/OpenGLEngine/MyShaderProgram.h

38 lines
624 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
class MyShaderProgram : public ShaderProgram
{
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-05 06:49:02 +00:00
float x;
float y;
float z;
};
struct Color // Try changing to normalized unsigned chars (0-255) for the example
{
float r;
float g;
float b;
float a;
};
typedef unsigned int Index;
typedef Renderable<Vertex, Index> Renderable;
typedef Mesh<Vertex, Index> Mesh;
2018-09-05 06:49:02 +00:00
MyShaderProgram();
private:
Shader m_vertex_shader;
Shader m_fragment_shader;
};