소스 검색

support for lost context

ncannasse 9 년 전
부모
커밋
970b2a177f
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      h3d/parts/GpuParticles.hx

+ 3 - 0
h3d/parts/GpuParticles.hx

@@ -619,6 +619,9 @@ class GpuParticles extends h3d.scene.MultiMaterial {
 		currentTime += ctx.elapsedTime;
 		if( prev < duration && currentTime >= duration )
 			onEnd();
+		if( primitive == null || primitive.buffer.isDisposed() )
+			for( g in groups )
+				g.needRebuild = true;
 		for( g in groups )
 			if( g.needRebuild ) {
 				rebuild(ctx.camera);