Simulant  21.12-194
A portable game engine for Windows, OSX, Linux, Dreamcast, and PSP
interfaces.h
1 /* * Copyright (c) 2011-2017 Luke Benstead https://simulant-engine.appspot.com
2  *
3  * This file is part of Simulant.
4  *
5  * Simulant is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * Simulant is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with Simulant. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 #ifndef INTERFACES_H
20 #define INTERFACES_H
21 
22 #include <vector>
23 #include "types.h"
24 
25 namespace smlt {
26 
27 class RenderTarget {
28 public:
29  virtual ~RenderTarget() {}
30 
31  virtual uint16_t width() const = 0;
32  virtual uint16_t height() const = 0;
33 
34  virtual void set_clear_every_frame(uint32_t clear_flags=BUFFER_CLEAR_ALL, const smlt::Colour& colour=smlt::Colour::BLACK) {
35  clear_flags_ = clear_flags;
36  clear_colour_ = colour;
37  }
38  virtual uint32_t clear_every_frame_flags() const { return clear_flags_; }
39  virtual smlt::Colour clear_every_frame_colour() const { return clear_colour_; }
40 
41 private:
42  uint32_t clear_flags_ = BUFFER_CLEAR_ALL;
43  smlt::Colour clear_colour_ = smlt::Colour::BLACK;
44 };
45 
46 }
47 
48 #endif // INTERFACES_H
smlt
Definition: animation.cpp:25
smlt::RenderTarget
Definition: interfaces.h:27
smlt::Colour
Definition: colour.h:29