context
This commit is contained in:
@@ -28,6 +28,16 @@ void TestImgui::onLoad() {
|
||||
std::cout << "No WindowModule for TestImgui!\n";
|
||||
std::abort();
|
||||
}
|
||||
|
||||
ImguiModule* im = (ImguiModule*) moduleInstances["ImguiModule"];
|
||||
|
||||
if(!im) {
|
||||
std::cout << "No ImguiModule for TestImgui!\n";
|
||||
std::abort();
|
||||
}
|
||||
|
||||
ImGui::SetCurrentContext(im->getContext());
|
||||
|
||||
}
|
||||
|
||||
void TestImgui::run() {
|
||||
@@ -41,7 +51,7 @@ void TestImgui::run() {
|
||||
static float f = 0.0f;
|
||||
static int counter = 0;
|
||||
|
||||
ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
|
||||
ImGui::Begin("TestImgui Module"); // Create a window called "Hello, world!" and append into it.
|
||||
|
||||
ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user