projects
/
laserbrain_demo
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
builds through mingw32 now. doesn't seem to run properly though
[laserbrain_demo]
/
src
/
objmesh.cc
1
#include "opengl.h"
2
#include "objmesh.h"
3
#include "snode.h"
4
5
ObjMesh::ObjMesh()
6
{
7
mesh = 0;
8
}
9
10
ObjType ObjMesh::get_type() const
11
{
12
return OBJ_MESH;
13
}
14
15
void ObjMesh::draw() const
16
{
17
if(!mesh) return;
18
19
mtl.setup();
20
21
if(node) {
22
glMatrixMode(GL_MODELVIEW);
23
glPushMatrix();
24
glMultMatrixf(node->get_matrix()[0]);
25
}
26
27
mesh->draw();
28
29
if(node) {
30
glMatrixMode(GL_MODELVIEW);
31
glPopMatrix();
32
}
33
}