2018-09-07 04:41:34 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "ShaderProgram.h"
|
|
|
|
#include "Shader.h"
|
|
|
|
#include "Mesh.h"
|
|
|
|
#include "Renderable.h"
|
|
|
|
|
|
|
|
class MyBatchTestShaderProgram : public ShaderProgram
|
|
|
|
{
|
|
|
|
public:
|
2018-09-07 15:45:32 +00:00
|
|
|
struct Vertex
|
2018-09-07 04:41:34 +00:00
|
|
|
{
|
2018-09-07 15:45:32 +00:00
|
|
|
Vertex() {}
|
|
|
|
Vertex(float x, float y, float z)
|
2018-09-07 04:41:34 +00:00
|
|
|
: x(x), y(y), z(z)
|
|
|
|
{}
|
|
|
|
float x;
|
|
|
|
float y;
|
|
|
|
float z;
|
|
|
|
};
|
2018-09-07 15:45:32 +00:00
|
|
|
struct Color // Try changing to normalized unsigned chars (0-255) for the example
|
2018-09-07 04:41:34 +00:00
|
|
|
{
|
2018-09-07 15:45:32 +00:00
|
|
|
float r = 0.0f;
|
|
|
|
float g = 0.0f;
|
|
|
|
float b = 0.0f;
|
|
|
|
float a = 1.0f;
|
2018-09-07 04:41:34 +00:00
|
|
|
};
|
2018-09-07 15:45:32 +00:00
|
|
|
struct Offset
|
|
|
|
{
|
|
|
|
float x = 0.0f;
|
|
|
|
float y = 0.0f;
|
|
|
|
float z = 0.0f;
|
|
|
|
};
|
|
|
|
typedef unsigned int Index;
|
|
|
|
typedef Renderable<Vertex, Index> Renderable;
|
|
|
|
typedef Mesh<Vertex, Index> Mesh;
|
2018-09-07 04:41:34 +00:00
|
|
|
|
|
|
|
MyBatchTestShaderProgram();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Shader m_vertex_shader;
|
|
|
|
Shader m_fragment_shader;
|
|
|
|
};
|