|
|
@ -82,12 +82,13 @@ void imgui_create(void *ctx)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (inited)
|
|
|
|
if (inited)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
inited = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!ctx)
|
|
|
|
if (!ctx)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
imgui_shutdown();
|
|
|
|
imgui_init();
|
|
|
|
imgui_init();
|
|
|
|
|
|
|
|
inited = true;
|
|
|
|
|
|
|
|
|
|
|
|
gladLoadGL();
|
|
|
|
gladLoadGL();
|
|
|
|
|
|
|
|
|
|
|
@ -154,10 +155,9 @@ void imgui_shutdown()
|
|
|
|
|
|
|
|
|
|
|
|
void imgui_set_context(void *ctx)
|
|
|
|
void imgui_set_context(void *ctx)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (!ctx) {
|
|
|
|
if (!ctx)
|
|
|
|
imgui_shutdown();
|
|
|
|
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#ifndef NDEBUG
|
|
|
|
std::cerr << __func__ << ": " << ctx << std::endl;
|
|
|
|
std::cerr << __func__ << ": " << ctx << std::endl;
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|