eqemu
annotate src/object.cc @ 3:f9274bebe55e
adding 3d graphics stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 17 Jul 2014 02:35:19 +0300 |
parents | |
children | 3d3656360a82 |
rev | line source |
---|---|
nuclear@3 | 1 #include "object.h" |
nuclear@3 | 2 |
nuclear@3 | 3 Object::Object() |
nuclear@3 | 4 { |
nuclear@3 | 5 mesh = 0; |
nuclear@3 | 6 } |
nuclear@3 | 7 |
nuclear@3 | 8 void Object::set_mesh(Mesh *mesh) |
nuclear@3 | 9 { |
nuclear@3 | 10 this->mesh = mesh; |
nuclear@3 | 11 } |
nuclear@3 | 12 |
nuclear@3 | 13 Mesh *Object::get_mesh() const |
nuclear@3 | 14 { |
nuclear@3 | 15 return mesh; |
nuclear@3 | 16 } |
nuclear@3 | 17 |
nuclear@3 | 18 void Object::render() const |
nuclear@3 | 19 { |
nuclear@3 | 20 if(!mesh) return; |
nuclear@3 | 21 |
nuclear@3 | 22 mtl.setup(); |
nuclear@3 | 23 mesh->draw(); |
nuclear@3 | 24 } |