#pragma once #include "stdafx.h" #include #include "Mesh.h" template class Renderable { public: typedef VertexType VertexType; typedef IndexType IndexType; typedef Mesh MeshType; virtual ~Renderable() { }; void init() { m_vbo = gen_vbo(); } const MeshType* get_mesh() const { return m_p_mesh; } GLuint get_vbo() const { return m_vbo; } protected: virtual GLuint gen_vbo() const = 0;// TODO: A VBO for every object? const MeshType* m_p_mesh = nullptr; GLuint m_vbo = 0; };