charcoal/OpenGLEngine/TextureRenderable.h

25 lines
670 B
C
Raw Permalink Normal View History

2018-09-16 00:43:29 +00:00
#pragma once
#include "Renderable.h"
#include "Texture.h"
#include "Sampler.h"
namespace charcoal
{
template <typename VertexType, typename IndexType>
2018-09-19 07:52:42 +00:00
class TextureRenderable : public RenderableT<VertexType, IndexType>
2018-09-16 00:43:29 +00:00
{
public:
2018-09-19 07:52:42 +00:00
TextureRenderable(const RenderableT<VertexType, IndexType>::MeshType* mesh, Texture* texture, Sampler* sampler, const DrawMode& draw_mode)
: RenderableT<VertexType, IndexType>(mesh, draw_mode), m_p_texture(texture), m_p_sampler(sampler)
2018-09-16 00:43:29 +00:00
{}
const Texture* get_texture() const { return m_p_texture; }
const Sampler* get_sampler() const { return m_p_sampler; }
private:
Texture* m_p_texture;
Sampler* m_p_sampler;
};
}