vrheights
view src/object.cc @ 16:7f6d68d95c22
updated to new version of goatvr
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 30 Oct 2015 06:34:31 +0200 |
parents | |
children |
line source
1 #include "object.h"
2 #include "opengl.h"
4 Object::Object()
5 {
6 mesh = 0;
7 }
9 void Object::set_mesh(Mesh *m)
10 {
11 mesh = m;
12 }
14 void Object::draw() const
15 {
16 if(!mesh) return;
18 glMatrixMode(GL_MODELVIEW);
19 glPushMatrix();
20 glMultTransposeMatrixf(xform[0]);
22 mtl.setup();
23 mesh->draw();
25 glPopMatrix();
26 }