charcoal/OpenGLEngine/Renderable.h

28 lines
446 B
C
Raw Normal View History

2018-09-05 06:49:02 +00:00
#pragma once
#include "stdafx.h"
2018-09-05 06:49:02 +00:00
#include <type_traits>
2018-09-05 06:49:02 +00:00
#include "Mesh.h"
2018-09-05 06:49:02 +00:00
template <typename VertexType, typename IndexType>
2018-09-05 06:49:02 +00:00
class Renderable
{
public:
typedef VertexType VertexType;
typedef IndexType IndexType;
typedef Mesh<VertexType, IndexType> MeshType;
virtual ~Renderable() { };
2018-09-05 06:49:02 +00:00
const MeshType* get_mesh() const
{
return m_p_mesh;
}
2018-09-05 06:49:02 +00:00
virtual void populate_vbo() const = 0;
2018-09-05 06:49:02 +00:00
protected:
const MeshType* m_p_mesh = nullptr;
2018-09-05 06:49:02 +00:00
};