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