charcoal/OpenGLEngine/Renderable.h
2018-09-19 03:52:42 -04:00

33 lines
648 B
C++

#pragma once
#include "stdafx.h"
#include <type_traits>
#include "Mesh.h"
#include "DrawMode.h"
#include "Batch.h"
namespace charcoal
{
template <typename VertexType, typename IndexType>
class RenderableT
{
public:
typedef VertexType VertexType;
typedef IndexType IndexType;
typedef Mesh<VertexType, IndexType> MeshType;
RenderableT(const MeshType* mesh, const DrawMode& draw_mode)
: m_p_mesh(mesh), m_draw_mode(draw_mode)
{}
const MeshType* get_mesh() const { return m_p_mesh; }
const DrawMode& get_draw_mode() const { return m_draw_mode; }
private:
const MeshType* m_p_mesh = nullptr;
DrawMode m_draw_mode;
};
}