]> git.tdb.fi Git - libs/gl.git/blobdiff - source/animatedobject.cpp
Restructure ProgramData to support sharing between Programs
[libs/gl.git] / source / animatedobject.cpp
index 0cc367861e905faa3023aa2d8a79dd266ef4f0cc..086666339800ec022484d33660fd6292da3c5f1b 100644 (file)
@@ -13,12 +13,8 @@ AnimatedObject::AnimatedObject(const Object &o):
        shdata(0)
 {
        if(const Technique *tech = object.get_technique())
-       {
-               // XXX Should create separate ProgramData for each pass
-               const RenderPass &pass = tech->get_pass(Tag());
-               if(const Program *shprog = pass.get_shader_program())
-                       shdata = new ProgramData(*shprog);
-       }
+               if(tech->has_shaders())
+                       shdata = new ProgramData;
 }
 
 void AnimatedObject::set_matrix(const Matrix &m)