charcoal/OpenGLEngine/MyBatchTestShaderProgram.h

38 lines
684 B
C
Raw Normal View History

#pragma once
#include "ShaderProgram.h"
#include "Shader.h"
#include "Mesh.h"
#include "Renderable.h"
class MyBatchTestShaderProgram : public ShaderProgram
{
public:
struct VertexType
{
VertexType() {}
VertexType(float x, float y, float z)
: x(x), y(y), z(z)
{}
float x;
float y;
float z;
};
struct ColorType // Try changing to normalized unsigned chars (0-255) for the example
{
float r;
float g;
float b;
float a;
};
typedef unsigned int IndexType;
typedef Renderable<VertexType, IndexType> RenderableType;
typedef Mesh<VertexType, IndexType> MeshType;
MyBatchTestShaderProgram();
private:
Shader m_vertex_shader;
Shader m_fragment_shader;
};