Browse Source

support for lost context

ncannasse 9 years ago
parent
commit
970b2a177f
1 changed files with 3 additions and 0 deletions
  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);