Commit 8301bd8d authored by Jakob Bornecrantz's avatar Jakob Bornecrantz

external: Refactor out sdl functions from main cimguo.cpp

parent 60be24e1
......@@ -4515,34 +4515,6 @@ CIMGUI_API void ImVector_ImWchar_UnInit(ImVector_ImWchar* p)
/////////////////////////extra Monado functions
#include "imgui_impl_sdl.h"
CIMGUI_API bool igImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
{
return ImGui_ImplSDL2_InitForOpenGL(window, sdl_gl_context);
}
#if 0
CIMGUI_API bool igImGui_ImplSDL2_InitForVulkan(SDL_Window* window)
{
return ImGui_ImplSDL2_InitForVulkan(window);
}
CIMGUI_API bool igImGui_ImplSDL2_InitForD3D(SDL_Window* window)
{
return ImGui_ImplSDL2_InitForD3D(window);
}
#endif
CIMGUI_API void igImGui_ImplSDL2_Shutdown()
{
ImGui_ImplSDL2_Shutdown();
}
CIMGUI_API void igImGui_ImplSDL2_NewFrame(SDL_Window* window)
{
ImGui_ImplSDL2_NewFrame(window);
}
CIMGUI_API bool igImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
{
return ImGui_ImplSDL2_ProcessEvent(event);
}
#include "imgui_impl_opengl3.h"
CIMGUI_API bool igImGui_ImplOpenGL3_Init(const char* glsl_version)
{
......
#include "./imgui/imgui.h"
#include "cimgui.h"
#include "./imgui/imgui_internal.h"
#include "imgui_impl_sdl.h"
CIMGUI_API bool igImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
{
return ImGui_ImplSDL2_InitForOpenGL(window, sdl_gl_context);
}
#if 0
CIMGUI_API bool igImGui_ImplSDL2_InitForVulkan(SDL_Window* window)
{
return ImGui_ImplSDL2_InitForVulkan(window);
}
CIMGUI_API bool igImGui_ImplSDL2_InitForD3D(SDL_Window* window)
{
return ImGui_ImplSDL2_InitForD3D(window);
}
#endif
CIMGUI_API void igImGui_ImplSDL2_Shutdown()
{
ImGui_ImplSDL2_Shutdown();
}
CIMGUI_API void igImGui_ImplSDL2_NewFrame(SDL_Window* window)
{
ImGui_ImplSDL2_NewFrame(window);
}
CIMGUI_API bool igImGui_ImplSDL2_ProcessEvent(const SDL_Event* event)
{
return ImGui_ImplSDL2_ProcessEvent(event);
}
......@@ -19,6 +19,7 @@ set(SOURCE_FILES
gui_sdl2_imgui.c
gui_sdl2_main.c
gui_sdl2_prober.c
../../../external/imgui/cimgui_sdl.cpp
../../../external/imgui/imgui_impl_sdl.cpp
../../../external/imgui/imgui_impl_sdl.h
)
......
......@@ -20,6 +20,7 @@ gui = executable(
'gui_sdl2_imgui.c',
'gui_sdl2_main.c',
'gui_sdl2_prober.c',
'../../../external/imgui/cimgui_sdl.cpp',
'../../../external/imgui/imgui_impl_sdl.cpp',
'../../../external/imgui/imgui_impl_sdl.h',
),
......
......@@ -76,6 +76,7 @@ if(BUILD_WITH_SDL2)
)
target_sources(${RUNTIME_TARGET} PRIVATE
../../../external/imgui/cimgui_sdl.cpp
../../../external/imgui/imgui_impl_sdl.cpp
../../../external/imgui/imgui_impl_sdl.h
)
......
......@@ -25,6 +25,7 @@ if sdl2.found()
hack_deps += sdl2
hack_src += [
'oxr_sdl2_hack.c',
'../../../external/imgui/cimgui_sdl.cpp',
'../../../external/imgui/imgui_impl_sdl.cpp',
'../../../external/imgui/imgui_impl_sdl.h',
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment