vrheights

view src/object.cc @ 15:ffb62c8db542

added missing makefile
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 30 Oct 2015 05:40:22 +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 }