namespace Msp {
namespace GL {
+Matrix Object::identity_matrix;
+
Object::Object():
lods(1),
lod0_watched(false)
set_technique(t);
}
+// TODO should have copy-c'tor to set watch on lod0 mesh if necessary
+
Object::~Object()
{
if(lods[0].mesh && lod0_watched)
return lods[i].technique.get();
}
-void Object::render(const Tag &tag) const
-{
- const RenderPass *pass = get_pass(tag, 0);
- if(!pass)
- return;
-
- Bind bind_shader(pass->get_shader_program());
- if(pass->get_shader_data())
- pass->get_shader_data()->apply();
- Bind bind_material(pass->get_material());
- Bind bind_texturing(pass->get_texturing());
-
- lods.front().mesh->draw();
-}
-
void Object::render(Renderer &renderer, const Tag &tag) const
{
const RenderPass *pass = get_pass(tag, 0);