|
@@ -19,11 +19,7 @@ private class ContextShared extends hrt.prefab.ContextShared {
|
|
|
var customLoadTexture : String -> h3d.mat.Texture;
|
|
|
|
|
|
public function new(loadTexture : String -> h3d.mat.Texture, ?root3d: h3d.scene.Object = null) {
|
|
|
- #if prefab2
|
|
|
super(root3d);
|
|
|
- #else
|
|
|
- super();
|
|
|
- #end
|
|
|
this.customLoadTexture = loadTexture;
|
|
|
}
|
|
|
|
|
@@ -768,18 +764,9 @@ class Library {
|
|
|
if (materialContainer == null)
|
|
|
materialContainer = new h3d.scene.Mesh(null, mat, null);
|
|
|
|
|
|
- #if prefab2
|
|
|
var shared = new ContextShared(loadTexture, materialContainer);
|
|
|
materialContainer.material = mat;
|
|
|
m.make(shared);
|
|
|
- #else
|
|
|
- var ctx = new hrt.prefab.Context();
|
|
|
- ctx.shared = new ContextShared(loadTexture);
|
|
|
-
|
|
|
- materialContainer.material = mat;
|
|
|
- ctx.local3d = materialContainer;
|
|
|
- m.make(ctx);
|
|
|
- #end
|
|
|
// Ensure there is no leak with this
|
|
|
materialContainer.material = null;
|
|
|
|