Bläddra i källkod

Fixed 08-update example.

Branimir Karadžić 12 år sedan
förälder
incheckning
0e81c0b2aa
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      examples/08-update/update.cpp

+ 5 - 0
examples/08-update/update.cpp

@@ -465,6 +465,11 @@ int _main_(int /*_argc*/, char** /*_argv*/)
 		bgfx::frame();
 	}
 
+	// texture2dData is managed from main thread, and it's passed to renderer
+	// just as MemoryRef. At this point render might be using it. We must wait
+	// previous frame to finish before we can free it.
+	bgfx::frame();
+
 	// Cleanup.
 	free(texture2dData);