]> git.tdb.fi Git - libs/gl.git/blob - source/objectinstance.cpp
Add class Renderable
[libs/gl.git] / source / objectinstance.cpp
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #include "object.h"
9 #include "objectinstance.h"
10 #include "programdata.h"
11
12 using namespace std;
13
14 namespace Msp {
15 namespace GL {
16
17 ObjectInstance::ObjectInstance(const Object &obj):
18         object(obj)
19 { }
20
21 bool ObjectInstance::has_pass(const string &pn) const
22 {
23         return object.has_pass(pn);
24 }
25
26 void ObjectInstance::render() const
27 {
28         object.render(*this);
29 }
30
31 void ObjectInstance::render(const string &pn) const
32 {
33         object.render(pn, *this);
34 }
35
36 } // namespace GL
37 } // namespaec Msp