Drawable.hpp
1
// Copyright 2019 Arthur Sonzogni. All rights reserved.
2
// Use of this source code is governed by the MIT license that can be found in
3
// the LICENSE file.
4
5
#ifndef SMK_DRAWABLE
6
#define SMK_DRAWABLE
7
8
#include <smk/RenderState.hpp>
9
10
namespace
smk {
11
class
RenderTarget;
12
13
/// Interface for class that can be draw to a smk::RenderTarget.
14
class
Drawable
{
15
public
:
16
/// Draw the object on a RenderTarget.
17
/// @param target: A RenderTarget to be drawn on.
18
/// @param state: The RenderState to derive from.
19
virtual
void
Draw
(
RenderTarget
& target,
RenderState
state)
const
= 0;
20
};
21
22
}
// namespace smk
23
24
#endif
/* end of include guard: SMK_DRAWABLE */
smk::Drawable
Interface for class that can be draw to a smk::RenderTarget.
Definition:
Drawable.hpp:14
smk::Drawable::Draw
virtual void Draw(RenderTarget &target, RenderState state) const =0
smk::RenderTarget
Definition:
RenderTarget.hpp:25
smk::RenderState
Contain all the data needed to draw.
Definition:
RenderState.hpp:17