GameKit
0.0.1a
C++ gamedev tools
include
gk
gl
IDrawable.hpp
Go to the documentation of this file.
1
/*
2
* =====================================================================================
3
*
4
* Filename: IDrawable.hpp
5
*
6
* Description:
7
*
8
* Created: 14/06/2018 19:53:57
9
*
10
* Author: Quentin Bazin, <quent42340@gmail.com>
11
*
12
* =====================================================================================
13
*/
14
#ifndef GK_IDRAWABLE_HPP_
15
#define GK_IDRAWABLE_HPP_
16
17
#include "
gk/gl/RenderTarget.hpp
"
18
19
namespace
gk
{
20
25
class
IDrawable
{
26
public
:
31
virtual
~IDrawable
() =
default
;
32
33
protected
:
34
friend
class
RenderTarget
;
35
47
virtual
void
draw
(
RenderTarget
&target,
RenderStates
states)
const
= 0;
48
};
49
50
}
// namespace gk
51
52
#endif // GK_IDRAWABLE_HPP_
53
gk::IDrawable::~IDrawable
virtual ~IDrawable()=default
Virtual destructor.
gk
Definition:
AudioPlayer.hpp:21
gk::RenderStates
Definition:
RenderStates.hpp:42
gk::IDrawable::draw
virtual void draw(RenderTarget &target, RenderStates states) const =0
Draw the object to a render target.
gk::RenderTarget
Definition:
RenderTarget.hpp:27
gk::IDrawable
Abstract base class for objects that can be drawn to a render target.
Definition:
IDrawable.hpp:25
RenderTarget.hpp
Generated by
1.8.12