Added CreateContext/DestroyContext/GetCurrentContext/SetCurrentContext() (#586, #269)

This commit is contained in:
ocornut
2016-05-07 19:54:27 +02:00
parent 69cc00f91f
commit 8b428e8c74
4 changed files with 38 additions and 24 deletions

View File

@ -245,7 +245,7 @@ void ImDrawList::PushClipRect(ImVec2 cr_min, ImVec2 cr_max, bool intersect_with_
void ImDrawList::PushClipRectFullScreen()
{
PushClipRect(ImVec2(GNullClipRect.x, GNullClipRect.y), ImVec2(GNullClipRect.z, GNullClipRect.w));
//PushClipRect(GetVisibleRect()); // FIXME-OPT: This would be more correct but we're not supposed to access ImGuiState from here?
//PushClipRect(GetVisibleRect()); // FIXME-OPT: This would be more correct but we're not supposed to access ImGuiContext from here?
}
void ImDrawList::PopClipRect()
@ -1665,7 +1665,7 @@ ImFont::~ImFont()
// If you want to delete fonts you need to do it between Render() and NewFrame().
// FIXME-CLEANUP
/*
ImGuiState& g = *GImGui;
ImGuiContext& g = *GImGui;
if (g.Font == this)
g.Font = NULL;
*/