charcoal/OpenGLEngine/MyShaderProgram.h
elipzer a8c4b05d2f It Works! A triangle renders on the screen.
This commit gets creates the ObjectOriented scene and gets it
working.

The current test program swaps a triangle from small to large with
the 1 and 2 keys on the keyboard. (1 for small and 2 for large).

The small triangle is rendered by the simple scene and the large
one is rendered by the object oriented one.
2018-09-05 19:10:38 -04:00

28 lines
447 B
C++

#pragma once
#include "ShaderProgram.h"
#include "Shader.h"
#include "Renderable.h"
class MyShaderProgram : public ShaderProgram
{
public:
struct VertexType
{
VertexType(float x, float y, float z)
: x(x), y(y), z(z)
{
}
float x;
float y;
float z;
};
typedef unsigned int IndexType;
typedef Renderable<VertexType, IndexType> RenderableType;
MyShaderProgram();
private:
Shader m_vertex_shader;
Shader m_fragment_shader;
};