mirror of
https://github.com/cimgui/cimgui.git
synced 2025-08-10 11:58:30 +01:00
cimgui_impl: reworked
This commit is contained in:
@@ -102,7 +102,6 @@ target_link_libraries(cimgui ${IMGUI_LIBRARIES} glfw)
|
||||
|
||||
|
||||
# using library
|
||||
include_directories(../../generator/output/)
|
||||
add_executable(${PROJECT_NAME} main.c)
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC -DCIMGUI_USE_DX11 -DCIMGUI_USE_GLFW)
|
||||
target_link_libraries(${PROJECT_NAME} d3d11 d3dcompiler.lib cimgui)
|
||||
|
@@ -106,7 +106,6 @@ target_link_libraries(cimgui ${IMGUI_LIBRARIES} glfw)
|
||||
|
||||
|
||||
# using library
|
||||
include_directories(../../generator/output/)
|
||||
add_executable(${PROJECT_NAME} main.c)
|
||||
target_compile_definitions(${PROJECT_NAME} PUBLIC -DCIMGUI_USE_OPENGL3 -DCIMGUI_USE_GLFW)
|
||||
target_link_libraries(${PROJECT_NAME} cimgui)
|
||||
|
@@ -97,7 +97,6 @@ endif(WIN32)
|
||||
target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} SDL2)
|
||||
|
||||
#using library
|
||||
include_directories(../../generator/output/)
|
||||
add_executable(test_sdl main.c)
|
||||
target_compile_definitions(test_sdl PUBLIC -DCIMGUI_USE_OPENGL3 -DCIMGUI_USE_SDL2)
|
||||
if (MINGW)
|
||||
|
@@ -18,11 +18,12 @@ else()
|
||||
set(TABLES_SOURCE "")
|
||||
endif()
|
||||
|
||||
include_directories(../../imgui)
|
||||
include_directories(../../imgui ../../imgui/backends)
|
||||
|
||||
|
||||
include_directories(../../)
|
||||
set(IMGUI_SOURCES ../../cimgui.cpp
|
||||
../../cimgui_impl.cpp
|
||||
../../imgui/imgui.cpp
|
||||
../../imgui/imgui_draw.cpp
|
||||
../../imgui/imgui_demo.cpp
|
||||
@@ -81,6 +82,7 @@ include_directories(${SDL2_SOURCE_DIR}/include)
|
||||
add_library(cimgui_sdl STATIC ${IMGUI_SOURCES})
|
||||
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_USER_CONFIG=\"../cimconfig.h\"")
|
||||
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
|
||||
target_compile_definitions(cimgui_sdl PUBLIC -DCIMGUI_USE_VULKAN -DCIMGUI_USE_SDL2)
|
||||
if (WIN32)
|
||||
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
|
||||
else(WIN32)
|
||||
@@ -89,7 +91,6 @@ endif(WIN32)
|
||||
#target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} SDL2-static)
|
||||
|
||||
#using library
|
||||
include_directories(../../generator/output/)
|
||||
add_executable(test_sdl main.c)
|
||||
target_compile_definitions(test_sdl PUBLIC -DCIMGUI_USE_VULKAN -DCIMGUI_USE_SDL2)
|
||||
if (MINGW)
|
||||
|
@@ -374,7 +374,9 @@ static void FramePresent(ImGui_ImplVulkanH_Window* wd)
|
||||
// Main code
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
g_MainWindowData.ClearEnable = true;
|
||||
//g_MainWindowData.ClearEnable = true;
|
||||
//ImGui_ImplVulkanH_Window_Construct(&g_MainWindowData);
|
||||
g_MainWindowData = *ImGui_ImplVulkanH_Window_ImGui_ImplVulkanH_Window();
|
||||
// Setup SDL
|
||||
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user