瀏覽代碼

minor fixes

Nicolas Cannasse 6 年之前
父節點
當前提交
fdf1ba6d09
共有 3 個文件被更改,包括 3 次插入2 次删除
  1. 1 0
      h3d/scene/MeshBatch.hx
  2. 1 1
      hxd/inspect/ScenePanel.hx
  3. 1 1
      samples/MeshBatch.hx

+ 1 - 0
h3d/scene/MeshBatch.hx

@@ -114,6 +114,7 @@ class MeshBatch extends Mesh {
 			b.shaders = shaders;
 			b.shaders = shaders;
 			b.buffer = new h3d.Buffer(tot,4,[UniformBuffer,Dynamic]);
 			b.buffer = new h3d.Buffer(tot,4,[UniformBuffer,Dynamic]);
 			b.data = new hxd.FloatBuffer(tot * 4);
 			b.data = new hxd.FloatBuffer(tot * 4);
+			b.next = dataPasses;
 			dataPasses = b;
 			dataPasses = b;
 
 
 			shader.Batch_Count = tot;
 			shader.Batch_Count = tot;

+ 1 - 1
hxd/inspect/ScenePanel.hx

@@ -139,7 +139,7 @@ private class CustomSceneProps extends SceneProps {
 							if( g.m.bits == mid ) {
 							if( g.m.bits == mid ) {
 								var inf = emap.get(g);
 								var inf = emap.get(g);
 								if( inf == null ) {
 								if( inf == null ) {
-									inf = { count : 0, pass : Lambda.count({ iterator : buf.material.getPasses }), tri : 0, name : e.model.r.name, e : e, g : g };
+									inf = { count : 0, pass : buf.material.getPasses().length, tri : 0, name : e.model.r.name, e : e, g : g };
 									all.push(inf);
 									all.push(inf);
 									emap.set(g, inf);
 									emap.set(g, inf);
 								}
 								}

+ 1 - 1
samples/MeshBatch.hx

@@ -35,7 +35,7 @@ class MeshBatch extends hxd.App {
 
 
 	override function init() {
 	override function init() {
 		new h3d.scene.fwd.DirLight(new h3d.Vector(-2,-3,-10), s3d);
 		new h3d.scene.fwd.DirLight(new h3d.Vector(-2,-3,-10), s3d);
-		var cube = new h3d.prim.Cube(1,1,true);
+		var cube = new h3d.prim.Cube(1,1,1,true);
 		cube.unindex();
 		cube.unindex();
 		cube.addNormals();
 		cube.addNormals();
 		s3d.lightSystem.ambientLight.set(0.5,0.5,0.5);
 		s3d.lightSystem.ambientLight.set(0.5,0.5,0.5);