HostDisplay: Move imgui context creation to base class

This commit is contained in:
Connor McLaughlin
2021-01-30 14:39:56 +10:00
parent e132cac0e5
commit e697d9aa33
24 changed files with 155 additions and 230 deletions

View File

@ -128,7 +128,7 @@ bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(g_GlslVersionString));
strcpy(g_GlslVersionString, glsl_version);
strcat(g_GlslVersionString, "\n");
return true;
return ImGui_ImplOpenGL3_CreateDeviceObjects();
}
void ImGui_ImplOpenGL3_Shutdown()
@ -538,8 +538,6 @@ bool ImGui_ImplOpenGL3_CreateDeviceObjects()
(GLvoid*)IM_OFFSETOF(ImDrawVert, col));
}
ImGui_ImplOpenGL3_CreateFontsTexture();
// Restore modified GL state
glBindTexture(GL_TEXTURE_2D, last_texture);
glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);