b494f68d0c
Now using GLFW3 instead of the custom window class. This library looks like it will make development much simpler and will make it so that I am less worried about my windows code breaking. Currently setup the http://antongerdelan.net/opengl/hellotriangle.html tutorial in the MySimpleScene. Will probably create another scene file to try to get the object oriented stuff working.
28 lines
446 B
C++
28 lines
446 B
C++
#pragma once
|
|
|
|
#include "stdafx.h"
|
|
|
|
#include <type_traits>
|
|
|
|
#include "Mesh.h"
|
|
|
|
template <typename VertexType, typename IndexType>
|
|
class Renderable
|
|
{
|
|
public:
|
|
typedef VertexType VertexType;
|
|
typedef IndexType IndexType;
|
|
typedef Mesh<VertexType, IndexType> MeshType;
|
|
|
|
virtual ~Renderable() { };
|
|
|
|
const MeshType* get_mesh() const
|
|
{
|
|
return m_p_mesh;
|
|
}
|
|
|
|
virtual void populate_vbo() const = 0;
|
|
|
|
protected:
|
|
const MeshType* m_p_mesh = nullptr;
|
|
}; |