33 lines
646 B
C++
33 lines
646 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 Renderable
|
|
{
|
|
public:
|
|
typedef VertexType VertexType;
|
|
typedef IndexType IndexType;
|
|
typedef Mesh<VertexType, IndexType> MeshType;
|
|
|
|
Renderable(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;
|
|
};
|
|
} |