From b01a1774c98a252b10ba2d8a75fdacb1fed49bf3 Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Sat, 9 Mar 2013 16:12:08 -0800 Subject: [PATCH] Added coverage for multiple init/shutdown. --- examples/00-helloworld/helloworld.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/examples/00-helloworld/helloworld.cpp b/examples/00-helloworld/helloworld.cpp index 447c5a12..29119205 100644 --- a/examples/00-helloworld/helloworld.cpp +++ b/examples/00-helloworld/helloworld.cpp @@ -16,6 +16,13 @@ int _main_(int _argc, char** _argv) uint32_t debug = BGFX_DEBUG_TEXT; uint32_t reset = BGFX_RESET_NONE; + // It's possible to call init/shutdown sequence multiple times inside + // the same application if it is necessary. State created between one + // init and shutdown doesn't carry over to another. + bgfx::init(); + bgfx::shutdown(); + + // Now init for real example. bgfx::init(); bgfx::reset(width, height);