triangle and imgui
This commit is contained in:
@@ -36,7 +36,7 @@ void ImguiModule::onLoad() {
|
||||
std::abort();
|
||||
}
|
||||
|
||||
window = wm->aquireWindow();
|
||||
window = (Archimedes::WindowGLFW*) wm->aquireWindow();
|
||||
|
||||
#ifdef RENDERER_SDL3
|
||||
renderer = window->getRenderer()->getRendererImpl()->renderer;
|
||||
@@ -78,7 +78,7 @@ void ImguiModule::onLoad() {
|
||||
std::cout << "rendererInit failed!\n" << std::endl;
|
||||
}
|
||||
|
||||
#if WINDOW == 2
|
||||
#ifdef WINDOW_SDL3
|
||||
ecmd_it = wm->addEventFn([](Archimedes::Event* e){
|
||||
if(e->userData.type() == typeid(SDL_Event*)) {
|
||||
ImGui_ImplSDL3_ProcessEvent(std::any_cast<SDL_Event*>(e->userData));
|
||||
@@ -93,9 +93,6 @@ void ImguiModule::onLoad() {
|
||||
}
|
||||
|
||||
void ImguiModule::run() {
|
||||
rendererNewFrame();
|
||||
windowNewFrame();
|
||||
ImGui::NewFrame();
|
||||
|
||||
ImGui::Render();
|
||||
|
||||
@@ -107,6 +104,10 @@ void ImguiModule::run() {
|
||||
|
||||
window->getWindowImpl()->restoreContext();
|
||||
}
|
||||
|
||||
rendererNewFrame();
|
||||
windowNewFrame();
|
||||
ImGui::NewFrame();
|
||||
};
|
||||
|
||||
bool ImguiModule::onEvent(const Archimedes::Event &e) {
|
||||
|
||||
Reference in New Issue
Block a user