Mondschein Engine  0.3.0
renderer.h
Go to the documentation of this file.
1 #ifndef GL13_H_INCLUDED
2 #define GL13_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 "gl13_types.h"
26 #include "core/renderer.h"
27 
28 namespace mondschein
29 {
30  namespace renderer
31  {
32  typedef boost::graph_traits<boost::adjacency_list<> >::adjacency_iterator adj_it;
33 
37  class GL13 : virtual public Renderer
38  {
39  private:
40  std::list<Renderable_c> renderstack;
41  virtual void render_children(scene::Scenegraph_c _sg,std::pair<adj_it,adj_it> _c);
42 
43 
44  public:
45  explicit GL13();
46  virtual ~GL13();
47  virtual void create_camera(const std::string& _id,const scene::camera_attribs_t& _c);
48  virtual void create_light(const std::string& _id,const scene::light_attribs_t& _l);
49  virtual void create_material(const std::string& _id,const scene::material_attribs_t& _m);
50  virtual void create_mesh(const std::string& _id,const scene::mesh_attribs_t& _m);
51  virtual void create_pose(const std::string& _id,const Eigen::Matrix4d& _m);
52  virtual void create_texture(const std::string& _id,const scene::texture_attribs_t& _t);
53 
54  virtual void set_renderstack(const std::list<Renderable_c> &_rs);
55  virtual std::list<Renderable_c> get_renderstack() const;
56 
57  virtual void toggle_feature(const std::string &_feature,bool _state);
58  virtual void set_clear_color(const Eigen::Vector4d &_color);
59 
60  virtual void clear_color_buffer();
61  virtual void clear_depth_buffer();
62  virtual std::string id() const;
63 
64  virtual void make_renderable(scene::Scenenode_c _sn);
65 
66  virtual void render(scene::Scenegraph_c _sg, const uint32 _start);
67  };
68  }
69 }
70 
71 #endif // GL13_H_INCLUDED