mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-25 17:01:12 +01:00
external: Refactor out sdl functions from main cimguo.cpp
This commit is contained in:
1 parent
60be24e119
commit
8301bd8d4c
6 files changed
+38
-28
No files matched your search
Vendored
-28
@@ -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)
|
||||
{
|
||||
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
#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',
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user