lib/mittsu/renderers/opengl/opengl_helper.rb in mittsu-0.1.7 vs lib/mittsu/renderers/opengl/opengl_helper.rb in mittsu-0.2.0

- old
+ new

@@ -135,26 +135,26 @@ array[offset + 2] = color.b * intensity end def painter_sort_stable(a, b) if a.object.render_order != b.object.render_order - a.object.render_order - b.object.render_order + a.object.render_order <=> b.object.render_order elsif a.material.id != b.material.id - a.material.id - b.material.id + a.material.id <=> b.material.id elsif a.z != b.z - a.z - b.z + a.z <=> b.z else - a.object.id - b.object.id + a.object.id <=> b.object.id end end def reverse_painter_sort_stable(a, b) if a.object.render_order != b.object.render_order - a.object.render_order - b.object.render_order + a.object.render_order <=> b.object.render_order elsif a.z != b.z - b.z - a.z + b.z <=> a.z else - a.id - b.id + b.id <=> a.id end end end end end