Mondschein Engine  0.3.0
renderer.h
Go to the documentation of this file.
1 #ifndef RENDERER_H_INCLUDED
2 #define RENDERER_H_INCLUDED
3 
4 /* Mondschein Engine is a fast, powerful, and easy-to-use 3D realtime rendering engine.
5  *
6  * Copyright (C) 2009-2013 by Andreas Amereller
7  * E-Mail: andreas.amereller.dev@googlemail.com
8  *
9  * This program is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU General Public License as published by the Free
11  * Software Foundation; either version 3 of the License, or (at your option)
12  * any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but WITHOUT
15  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17  * more details.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write to the Free Software Foundation, Inc.,
21  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22  */
24 
25 #include "types.h"
26 #include "core/context.h"
27 
28 #include <string>
29 
30 namespace mondschein
31 {
32  namespace renderer
33  {
42  class Renderer
43  {
44  private:
45  Context_p context;
46 
47  protected:
48  explicit Renderer();
49  virtual ~Renderer();
50 
51  public:
62  virtual void set_context(Context_p _c);
63 
71  virtual Context_p get_context() const;
72 
82  virtual void toggle_feature(const std::string &_feature,bool _state) = 0;
83 
91  virtual bool query_extension(const std::string &_ext);
92 
98  virtual void set_clear_color(const Eigen::Vector4d &_c) = 0;
99 
101  virtual void clear_color_buffer() = 0;
102 
104  virtual void clear_depth_buffer() = 0;
105 
114  virtual std::string id() const = 0;
115 
123  virtual void make_renderable(scene::Scenenode_c _sn) = 0;
124 
130  virtual void render(scene::Scenegraph_c _sg, const uint32 _start) = 0;
131  };
132  }
133 }
134 
135 #endif // RENDERER_H_INCLUDED