Parcourir la source

fixed compilation with latest heaps

ncannasse il y a 6 ans
Parent
commit
62acab919c

+ 1 - 1
hide/Renderer.hx

@@ -32,7 +32,7 @@ class MaterialSetup extends h3d.mat.MaterialSetup {
 	}
 }
 
-class Renderer extends h3d.scene.DefaultRenderer {
+class Renderer extends h3d.scene.fwd.Renderer {
 
 	var composite: h3d.pass.ScreenFx<DefaultForwardComposite>;
 	var outline = new ScreenOutline();

+ 2 - 2
hide/prefab/Light.hx

@@ -126,8 +126,8 @@ class Light extends Object3D {
 		var isPbr = Std.is(h3d.mat.MaterialSetup.current, h3d.mat.PbrMaterialSetup);
 		if( !isPbr ) {
 			switch( kind ) {
-			case Point: ctx.local3d = new h3d.scene.PointLight(ctx.local3d);
-			case Directional: ctx.local3d = new h3d.scene.DirLight(ctx.local3d);
+			case Point: ctx.local3d = new h3d.scene.fwd.PointLight(ctx.local3d);
+			case Directional: ctx.local3d = new h3d.scene.fwd.DirLight(ctx.local3d);
 			case Spot:
 			}
 		} else {

+ 3 - 3
hide/view/FXEditor.hx

@@ -114,7 +114,7 @@ class FXEditor extends FileView {
 	var fxprops : hide.comp.PropsEditor;
 
 	var tools : hide.comp.Toolbar;
-	var light : h3d.scene.DirLight;
+	var light : h3d.scene.fwd.DirLight;
 	var lightDirection = new h3d.Vector( 1, 2, -4 );
 
 	var scene(get, null):  hide.comp.Scene;
@@ -346,9 +346,9 @@ class FXEditor extends FileView {
 	}
 
 	public function onSceneReady() {
-		light = sceneEditor.scene.s3d.find(function(o) return Std.instance(o, h3d.scene.DirLight));
+		light = sceneEditor.scene.s3d.find(function(o) return Std.instance(o, h3d.scene.fwd.DirLight));
 		if( light == null ) {
-			light = new h3d.scene.DirLight(scene.s3d);
+			light = new h3d.scene.fwd.DirLight(scene.s3d);
 			light.enableSpecular = true;
 		} else
 			light = null;

+ 2 - 1
hide/view/Particles3D.hx

@@ -301,8 +301,9 @@ class Particles3D extends FileView {
 		var defAmbient = scene.s3d.lightSystem.ambientLight.clone();
 		extra.find(".lights").change(function(e) {
 			var ls = scene.s3d.lightSystem;
+			var lfw = Std.instance(ls, h3d.scene.fwd.LightSystem);
 			var enable = e.getThis().prop("checked");
-			ls.maxLightsPerObject = enable ? 6 : 0;
+			if( lfw != null ) lfw.maxLightsPerObject = enable ? 6 : 0;
 			if( enable ) ls.ambientLight.load(defAmbient) else ls.ambientLight.set(1, 1, 1);
 		});
 		extra.find(".new").click(function(_) {

+ 3 - 3
hide/view/Prefab.hx

@@ -30,7 +30,7 @@ class Prefab extends FileView {
 	var tabs : hide.comp.Tabs;
 
 	var tools : hide.comp.Toolbar;
-	var light : h3d.scene.DirLight;
+	var light : h3d.scene.fwd.DirLight;
 	var lightDirection = new h3d.Vector( 1, 2, -4 );
 
 
@@ -101,9 +101,9 @@ class Prefab extends FileView {
 	}
 
 	public function onSceneReady() {
-		light = sceneEditor.scene.s3d.find(function(o) return Std.instance(o, h3d.scene.DirLight));
+		light = sceneEditor.scene.s3d.find(function(o) return Std.instance(o, h3d.scene.fwd.DirLight));
 		if( light == null ) {
-			light = new h3d.scene.DirLight(scene.s3d);
+			light = new h3d.scene.fwd.DirLight(scene.s3d);
 			light.enableSpecular = true;
 		} else
 			light = null;

+ 4 - 1
hide/view/l3d/LightProbeBaker.hx

@@ -136,7 +136,10 @@ class LightProbeBaker {
 				p = p.next;
 			}
 			prev.next = null;
-			passes.push(new h3d.scene.Renderer.PassObjects(curPass.pass.name,curPass));
+			var po = new h3d.scene.Renderer.PassObjects();
+			po.name = curPass.pass.name;
+			po.passes = new h3d.pass.PassList(curPass);
+			passes.push(po);
 			curPass = p;
 		}
 	}