From: Mikko Rasa Date: Wed, 22 Aug 2012 11:22:36 +0000 (+0300) Subject: Add a shortcut constructor to Object X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=b5dd2b141640b2483cc290d99cdc2a0bf72be1b4;p=libs%2Fgl.git Add a shortcut constructor to Object --- diff --git a/source/object.cpp b/source/object.cpp index 5aec7e74..f23f6658 100644 --- a/source/object.cpp +++ b/source/object.cpp @@ -19,6 +19,12 @@ Object::Object(): meshes(1) { } +Object::Object(const Mesh *m, const Technique *t) +{ + set_mesh(m); + set_technique(t); +} + Object::~Object() { } diff --git a/source/object.h b/source/object.h index a574fb64..bd66e7ee 100644 --- a/source/object.h +++ b/source/object.h @@ -46,6 +46,7 @@ public: }; Object(); + Object(const Mesh *, const Technique *); ~Object(); void set_mesh(const Mesh *m) { set_mesh(0, m); }