eqemu

diff 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
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/object.cc	Thu Jul 17 02:35:19 2014 +0300
     1.3 @@ -0,0 +1,24 @@
     1.4 +#include "object.h"
     1.5 +
     1.6 +Object::Object()
     1.7 +{
     1.8 +	mesh = 0;
     1.9 +}
    1.10 +
    1.11 +void Object::set_mesh(Mesh *mesh)
    1.12 +{
    1.13 +	this->mesh = mesh;
    1.14 +}
    1.15 +
    1.16 +Mesh *Object::get_mesh() const
    1.17 +{
    1.18 +	return mesh;
    1.19 +}
    1.20 +
    1.21 +void Object::render() const
    1.22 +{
    1.23 +	if(!mesh) return;
    1.24 +
    1.25 +	mtl.setup();
    1.26 +	mesh->draw();
    1.27 +}