Compare commits

..

17 Commits

Author SHA1 Message Date
sonoro1234
daac7262b3 example_sdl_vulkan tries to emulate imgui 2025-02-21 16:56:14 +01:00
sonoro1234
2e5db87e99 backends: use cmake FetchContent for SDL2 examples 2025-02-05 17:53:05 +01:00
sonoro1234
387e5e0d8b generator.lua: corrections for Vulkan generation as now needs ImVector, also corrections in example_sdl_vulkan/main.c for last breaking changes. 2025-02-04 18:51:13 +01:00
sonoro1234
10a7a9f3f3 pull imgui 1.91.8dock and generate 2025-02-04 16:38:45 +01:00
sonoro1234
9bc279c4d8 pull imgui docking 1.91.7 and generate 2025-01-21 15:59:46 +01:00
sonoro1234
46c47d5703 generator.lua: change for Used4kPagesMap -> Used8kPagesMap 2025-01-21 10:50:30 +01:00
sonoro1234
e5facd9083 cpp2ffi: better functypedef parsing
Some checks failed
Build / build (ubuntu-latest) (push) Failing after 4s
Build / build (macOS-latest) (push) Has been cancelled
Build / build (windows-latest) (push) Has been cancelled
2025-01-17 17:08:30 +01:00
sonoro1234
7d50243c50 better ftemplates repair 2025-01-08 16:49:42 +01:00
sonoro1234
7715efaa41 cpp2ffi: constexpr -> static const and ftemplates repair 2025-01-08 15:54:31 +01:00
sonoro1234
9cc8f27f61 cpp2ffi: autodetect nonPOD 2025-01-08 12:41:00 +01:00
sonoro1234
df65595422 generation 2025-01-08 10:46:11 +01:00
sonoro1234
2a0af76f16 cpp2ffi: git diffs are line oriented so Lua serializer uses pretty 2025-01-08 10:45:47 +01:00
sonoro1234
1053d1584f cpp2ffi: final and operator keywords 2025-01-08 00:43:55 +01:00
sonoro1234
d83e8c5892 oops!! doing last commit complete (Always have to build before commiting) 2025-01-06 19:10:59 +01:00
sonoro1234
98b667f601 modify manual function for ImGuiTextBuffer issue #283 2025-01-06 18:19:54 +01:00
sonoro1234
d9982af929 generation with new lua serializer 2024-12-18 15:17:18 +01:00
sonoro1234
58763282f8 cpp2ffi: more compact lua serialization 2024-12-18 15:15:46 +01:00
23 changed files with 52991 additions and 43746 deletions

View File

@@ -11,7 +11,7 @@ History:
Initially cimgui was developed by Stephan Dilly as hand-written code but lately turned into an auto-generated version by sonoro1234 in order to keep up with imgui more easily (letting the user select the desired branch and commit) Initially cimgui was developed by Stephan Dilly as hand-written code but lately turned into an auto-generated version by sonoro1234 in order to keep up with imgui more easily (letting the user select the desired branch and commit)
Notes: Notes:
* currently this wrapper is based on version [1.91.6 of Dear ImGui with internal api] * currently this wrapper is based on version [1.91.8 of Dear ImGui with internal api]
* only functions, structs and enums from imgui.h (an optionally imgui_internal.h) are wrapped. * only functions, structs and enums from imgui.h (an optionally imgui_internal.h) are wrapped.
* if you are interested in imgui backends you should look [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui) project. * if you are interested in imgui backends you should look [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui) project.
* All naming is algorithmic except for those names that were coded in cimgui_overloads table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L60). In the official version this table is empty. * All naming is algorithmic except for those names that were coded in cimgui_overloads table (https://github.com/cimgui/cimgui/blob/master/generator/generator.lua#L60). In the official version this table is empty.

View File

@@ -22,8 +22,6 @@ else()
endif() endif()
include_directories(../../imgui) include_directories(../../imgui)
add_definitions("-DIMGUI_USER_CONFIG=\"../cimconfig.h\"")
add_definitions("-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
include_directories(../../) include_directories(../../)
set(IMGUI_SOURCES set(IMGUI_SOURCES
@@ -38,11 +36,7 @@ ${TABLES_SOURCE}
set(IMGUI_SOURCES_sdl) set(IMGUI_SOURCES_sdl)
set(IMGUI_LIBRARIES ) set(IMGUI_LIBRARIES )
if (WIN32)
add_definitions("-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
else(WIN32)
add_definitions("-DIMGUI_IMPL_API=extern \"C\" ")
endif(WIN32)
add_compile_definitions("IMGUI_IMPL_OPENGL_LOADER_GL3W") add_compile_definitions("IMGUI_IMPL_OPENGL_LOADER_GL3W")
@@ -66,40 +60,41 @@ else(WIN32)#Unix
endif(WIN32) endif(WIN32)
#sdl2
list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_sdl2.cpp) list(APPEND IMGUI_SOURCES ${BAKENDS_FOLDER}imgui_impl_sdl2.cpp)
if(DEFINED SDL_PATH) include(FetchContent)
message(STATUS "SDL_PATH defined as " ${SDL_PATH}) Set(FETCHCONTENT_QUIET FALSE)
FIND_PACKAGE(SDL2 PATHS ${SDL_PATH})
else(DEFINED SDL_PATH)
# If SDL_PATH is not set, fallback and attempt to find SDL cmake script at a default location
find_package(SDL2)
endif(DEFINED SDL_PATH)
if(SDL2_FOUND) FetchContent_Declare(
get_target_property(SDL_INCLUDE SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) SDL2
message(STATUS "sdlinclude is " ${SDL_INCLUDE}) GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
if ("${SDL_INCLUDE}" STREQUAL "" OR "${SDL_INCLUDE}" STREQUAL "SDL_INCLUDE-NOTFOUND") #if not found latest SDL2 cmake config use older GIT_TAG release-2.30.12
message(STATUS "sdlinclude2 is " ${SDL2_INCLUDE_DIRS}) #GIT_SHALLOW TRUE
include_directories(${SDL2_INCLUDE_DIRS}) GIT_PROGRESS TRUE
set(IMGUI_SDL_LIBRARY ${SDL2_LIBRARIES}) )
message(STATUS IMGUI_SDL_LIBRARY ${SDL2_LIBRARIES}) #FetchContent_MakeAvailable(SDL2)
else()#use new one SDL2 config FetchContent_GetProperties(SDL2)
include_directories(${SDL_INCLUDE}) if (NOT sdl2_POPULATED)
set(IMGUI_SDL_LIBRARY SDL2::SDL2) set(FETCHCONTENT_QUIET NO)
set(SDL_MAIN SDL2::SDL2main) FetchContent_Populate(SDL2)
message(STATUS ${SDL_MAIN} ${IMGUI_SDL_LIBRARY}) set(SDL_TEST OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED_LIBS ON CACHE BOOL "" FORCE)
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
endif() endif()
else(SDL2_FOUND) include_directories(${SDL2_SOURCE_DIR}/include})
if(DEFINED SDL_PATH)
message(FATAL_ERROR "Cannot find SDL at SDL_PATH") #if dynamic SDL2 then install
else(DEFINED SDL_PATH) install(TARGETS SDL2 RUNTIME DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
message(FATAL_ERROR "Cannot find SDL. Maybe try specifying SDL_PATH?") LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
endif(DEFINED SDL_PATH) )
endif(SDL2_FOUND)
add_library(cimgui_sdl SHARED ${IMGUI_SOURCES}) add_library(cimgui_sdl SHARED ${IMGUI_SOURCES})
target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} ${IMGUI_SDL_LIBRARY}) target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
if (WIN32)
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
else(WIN32)
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" ")
endif(WIN32)
target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} SDL2)
#using library #using library
include_directories(../../generator/output/) include_directories(../../generator/output/)
@@ -108,5 +103,4 @@ target_compile_definitions(test_sdl PUBLIC -DCIMGUI_USE_OPENGL3 -DCIMGUI_USE_SDL
if (MINGW) if (MINGW)
target_link_options(test_sdl PRIVATE "-mconsole") target_link_options(test_sdl PRIVATE "-mconsole")
endif() endif()
target_link_libraries(test_sdl ${IMGUI_SDL_LIBRARY} cimgui_sdl) target_link_libraries(test_sdl SDL2 cimgui_sdl)

View File

@@ -0,0 +1,2 @@
To build use `cmake path_to_example_sdl_opengl3` and then `make install`

View File

@@ -19,8 +19,7 @@ else()
endif() endif()
include_directories(../../imgui) include_directories(../../imgui)
add_definitions("-DIMGUI_USER_CONFIG=\"../cimconfig.h\"")
add_definitions("-DIMGUI_DISABLE_OBSOLETE_FUNCTIONS=1")
include_directories(../../) include_directories(../../)
set(IMGUI_SOURCES ../../cimgui.cpp set(IMGUI_SOURCES ../../cimgui.cpp
@@ -34,11 +33,6 @@ ${TABLES_SOURCE}
set(IMGUI_SOURCES_sdl) set(IMGUI_SOURCES_sdl)
set(IMGUI_LIBRARIES ) set(IMGUI_LIBRARIES )
if (WIN32)
add_definitions("-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
else(WIN32)
add_definitions("-DIMGUI_IMPL_API=extern \"C\" ")
endif(WIN32)
#optional adding freetype #optional adding freetype
option(IMGUI_FREETYPE "add Freetype2" OFF) option(IMGUI_FREETYPE "add Freetype2" OFF)
@@ -54,41 +48,45 @@ endif(IMGUI_FREETYPE)
find_package(Vulkan REQUIRED FATAL_ERROR) find_package(Vulkan REQUIRED FATAL_ERROR)
list(APPEND IMGUI_LIBRARIES Vulkan::Vulkan) list(APPEND IMGUI_LIBRARIES Vulkan::Vulkan)
list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_vulkan.cpp) list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_vulkan.cpp)
include_directories(${Vulkan_INCLUDE_DIRS})
#sdl2 #sdl2
list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_sdl2.cpp) list(APPEND IMGUI_SOURCES ${BACKENDS_FOLDER}imgui_impl_sdl2.cpp)
if(DEFINED SDL_PATH) include(FetchContent)
message(STATUS "SDL_PATH defined as " ${SDL_PATH}) Set(FETCHCONTENT_QUIET FALSE)
FIND_PACKAGE(SDL2 PATHS ${SDL_PATH})
else(DEFINED SDL_PATH)
# If SDL_PATH is not set, fallback and attempt to find SDL cmake script at a default location
find_package(SDL2)
endif(DEFINED SDL_PATH)
if(SDL2_FOUND) FetchContent_Declare(
get_target_property(SDL_INCLUDE SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES) SDL2
message(STATUS "sdlinclude is " ${SDL_INCLUDE}) GIT_REPOSITORY https://github.com/libsdl-org/SDL.git
if ("${SDL_INCLUDE}" STREQUAL "" OR "${SDL_INCLUDE}" STREQUAL "SDL_INCLUDE-NOTFOUND") #if not found latest SDL2 cmake config use older GIT_TAG release-2.30.12
message(STATUS "sdlinclude2 is " ${SDL2_INCLUDE_DIRS}) #GIT_SHALLOW TRUE
include_directories(${SDL2_INCLUDE_DIRS}) GIT_PROGRESS TRUE
set(IMGUI_SDL_LIBRARY ${SDL2_LIBRARIES}) )
message(STATUS IMGUI_SDL_LIBRARY ${SDL2_LIBRARIES}) FetchContent_GetProperties(SDL2)
else()#use new one SDL2 config if (NOT sdl2_POPULATED)
include_directories(${SDL_INCLUDE}) set(FETCHCONTENT_QUIET NO)
set(IMGUI_SDL_LIBRARY SDL2::SDL2) FetchContent_Populate(SDL2)
set(SDL_MAIN SDL2::SDL2main) set(SDL_TEST OFF CACHE BOOL "" FORCE)
message(STATUS ${SDL_MAIN} ${IMGUI_SDL_LIBRARY}) set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
add_subdirectory(${sdl2_SOURCE_DIR} ${sdl2_BINARY_DIR})
endif() endif()
else(SDL2_FOUND) include_directories(${SDL2_SOURCE_DIR}/include)
if(DEFINED SDL_PATH)
message(FATAL_ERROR "Cannot find SDL at SDL_PATH")
else(DEFINED SDL_PATH)
message(FATAL_ERROR "Cannot find SDL. Maybe try specifying SDL_PATH?")
endif(DEFINED SDL_PATH)
endif(SDL2_FOUND)
add_library(cimgui_sdl SHARED ${IMGUI_SOURCES})
target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} ${IMGUI_SDL_LIBRARY}) #if dynamic SDL2 then install
# install(TARGETS SDL2 RUNTIME DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
# LIBRARY DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
# )
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")
if (WIN32)
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" __declspec\(dllexport\)")
else(WIN32)
target_compile_definitions(cimgui_sdl PUBLIC "-DIMGUI_IMPL_API=extern \"C\" ")
endif(WIN32)
#target_link_libraries(cimgui_sdl ${IMGUI_LIBRARIES} SDL2-static)
#using library #using library
include_directories(../../generator/output/) include_directories(../../generator/output/)
@@ -97,5 +95,5 @@ target_compile_definitions(test_sdl PUBLIC -DCIMGUI_USE_VULKAN -DCIMGUI_USE_SDL2
if (MINGW) if (MINGW)
target_link_options(test_sdl PRIVATE "-mconsole") target_link_options(test_sdl PRIVATE "-mconsole")
endif() endif()
target_link_libraries(test_sdl ${IMGUI_SDL_LIBRARY} cimgui_sdl) target_link_libraries(test_sdl SDL2-static cimgui_sdl ${IMGUI_LIBRARIES})

View File

@@ -0,0 +1,3 @@
This example needs vulkan generation before compilation: Vulkan SDK should be installed and then add "vulkan" to generator.bat and generate.
To build use `cmake path_to_example_sdl_vulkan` and then `make install`

View File

@@ -1,13 +1,19 @@
#include <stdio.h> #include <stdio.h> // printf, fprintf
#include <stdlib.h> // abort
#include <assert.h> #include <assert.h>
#define SDL_MAIN_HANDLED #define SDL_MAIN_HANDLED
#include <SDL.h> #include <SDL.h>
#include <SDL_vulkan.h> #include <SDL_vulkan.h>
#include <vulkan/vulkan.h> #include <vulkan/vulkan.h>
#ifdef _MSC_VER // Volk headers
#include <windows.h> #ifdef IMGUI_IMPL_VULKAN_USE_VOLK
#define VOLK_IMPLEMENTATION
#include <volk.h>
#endif #endif
//this must be equal to that in imgui_impl_vulkan.h
#define IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE (1) // Minimum per atlas
#define CIMGUI_DEFINE_ENUMS_AND_STRUCTS #define CIMGUI_DEFINE_ENUMS_AND_STRUCTS
#include "cimgui.h" #include "cimgui.h"
#include "cimgui_impl.h" #include "cimgui_impl.h"
@@ -24,6 +30,12 @@
#define IM_ASSERT(_EXPR) assert(_EXPR) #define IM_ASSERT(_EXPR) assert(_EXPR)
#define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR)))) #define IM_ARRAYSIZE(_ARR) ((int)(sizeof(_ARR) / sizeof(*(_ARR))))
//#define APP_USE_UNLIMITED_FRAME_RATE
#ifdef _DEBUG
#define APP_USE_VULKAN_DEBUG_REPORT
#endif
#define APP_USE_VULKAN_DEBUG_REPORT
// Data
static VkAllocationCallbacks* g_Allocator = NULL; static VkAllocationCallbacks* g_Allocator = NULL;
static VkInstance g_Instance = VK_NULL_HANDLE; static VkInstance g_Instance = VK_NULL_HANDLE;
static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE; static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
@@ -40,172 +52,188 @@ static bool g_SwapChainRebuild = false;
static void check_vk_result(VkResult err) static void check_vk_result(VkResult err)
{ {
if (err == 0) if (err == VK_SUCCESS)
return; return;
fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err); fprintf(stderr, "[vulkan] Error: VkResult = %d\n", err);
if (err < 0) if (err < 0)
abort(); abort();
} }
#ifdef IMGUI_VULKAN_DEBUG_REPORT static void check_vk_result_line(VkResult err,int line)
static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags,
VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location,
int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
{ {
(void)flags; (void)object; (void)location; (void)messageCode; if (err == VK_SUCCESS)
(void)pUserData; (void)pLayerPrefix; // Unused arguments return;
fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", fprintf(stderr, "[vulkan] Error: VkResult = %d in line: (%d)\n", err, line);
objectType, pMessage); if (err < 0)
abort();
}
#ifdef APP_USE_VULKAN_DEBUG_REPORT
static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
{
(void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
fprintf(stderr, "[vulkan] Debug report from ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
return VK_FALSE; return VK_FALSE;
} }
#endif // IMGUI_VULKAN_DEBUG_REPORT #endif // APP_USE_VULKAN_DEBUG_REPORT
//*
static bool IsExtensionAvailable(VkExtensionProperties* properties, uint32_t properties_count, const char* extension)
{
for(uint32_t i = 0 ; i < properties_count; i++){
if (strcmp(properties[i].extensionName, extension) == 0)
return true;
}
return false;
}
static void SetupVulkan(const char** extensions, uint32_t extensions_count) static void SetupVulkan(const char** extensions, uint32_t extensions_count)
{ {
VkResult err; VkResult err;
#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
// Create Vulkan Instance volkInitialize();
VkInstanceCreateInfo inst_create_info = {
.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO,
.enabledExtensionCount = extensions_count,
.ppEnabledExtensionNames = extensions,
};
#ifdef IMGUI_VULKAN_DEBUG_REPORT
// Enabling validation layers
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
inst_create_info.enabledLayerCount = 1;
inst_create_info.ppEnabledLayerNames = layers;
// Enable debug report extension (we need additional storage, so we duplicate the user array to add our new extension to it)
const char** extensions_ext = (const char**)malloc(
sizeof(const char*) * (extensions_count + 1));
memcpy(extensions_ext, extensions, extensions_count * sizeof(const char*));
extensions_ext[extensions_count] = "VK_EXT_debug_report";
inst_create_info.enabledExtensionCount = extensions_count + 1;
inst_create_info.ppEnabledExtensionNames = extensions_ext;
// Create Vulkan Instance
err = vkCreateInstance(&inst_create_info, g_Allocator, &g_Instance);
check_vk_result(err);
free(extensions_ext);
// Get the function pointer (required for any extensions)
PFN_vkCreateDebugReportCallbackEXT vkCreateDebugReportCallbackEXT =
(PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance,
"vkCreateDebugReportCallbackEXT");
IM_ASSERT(vkCreateDebugReportCallbackEXT != NULL);
// Setup the debug report callback
VkDebugReportCallbackCreateInfoEXT debug_report_ci = {
.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT,
.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT |
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
.pfnCallback = debug_report,
.pUserData = NULL,
};
err = vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator,
&g_DebugReport);
check_vk_result(err);
#else
// Create Vulkan Instance without any debug feature
err = vkCreateInstance(&inst_create_info, g_Allocator, &g_Instance);
check_vk_result(err);
IM_UNUSED(g_DebugReport);
#endif #endif
// Select GPU // Create Vulkan Instance
uint32_t gpu_count;
err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, NULL);
check_vk_result(err);
IM_ASSERT(gpu_count > 0);
VkPhysicalDevice* gpus = (VkPhysicalDevice*)malloc(sizeof(VkPhysicalDevice) * gpu_count);
err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, gpus);
check_vk_result(err);
// If a number >1 of GPUs got reported, find discrete GPU if present, or use first one available. This covers
// most common cases (multi-gpu/integrated+dedicated graphics). Handling more complicated setups (multiple
// dedicated GPUs) is out of scope of this sample.
int use_gpu = 0;
for (int i = 0; i < (int)gpu_count; i++)
{ {
VkPhysicalDeviceProperties properties; VkInstanceCreateInfo create_info = {};
vkGetPhysicalDeviceProperties(gpus[i], &properties); create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
if (properties.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU)
// Enumerate available extensions
uint32_t properties_count;
vkEnumerateInstanceExtensionProperties(NULL, &properties_count, NULL);
VkExtensionProperties* properties = (VkExtensionProperties*)malloc(properties_count * sizeof(VkExtensionProperties));
err = vkEnumerateInstanceExtensionProperties(NULL, &properties_count, properties);
check_vk_result_line(err, __LINE__);
// Enable required extensions
if (IsExtensionAvailable(properties, properties_count, VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME)){
//instance_extensions.push_back(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
extensions_count++;
extensions = realloc(extensions, extensions_count * sizeof(char*));
assert(extensions);
extensions[extensions_count-1] = VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME;
}
#ifdef VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME
if (IsExtensionAvailable(properties, properties_count, VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME))
{ {
use_gpu = i; //instance_extensions.push_back(VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME);
break; extensions_count++;
extensions = realloc(extensions, extensions_count * sizeof(char*));
assert(extensions);
extensions[extensions_count-1] = VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME;
create_info.flags |= VK_INSTANCE_CREATE_ENUMERATE_PORTABILITY_BIT_KHR;
} }
#endif
free(properties);
// Enabling validation layers
#ifdef APP_USE_VULKAN_DEBUG_REPORT
const char* layers[] = { "VK_LAYER_KHRONOS_validation" };
create_info.enabledLayerCount = 1;
create_info.ppEnabledLayerNames = layers;
//instance_extensions.push_back("VK_EXT_debug_report");
extensions_count++;
extensions = realloc(extensions, extensions_count * sizeof(char*));
assert(extensions);
extensions[extensions_count-1] = "VK_EXT_debug_report";
#endif
// Create Vulkan Instance
create_info.enabledExtensionCount = extensions_count;//(uint32_t)instance_extensions.Size;
create_info.ppEnabledExtensionNames = extensions;//instance_extensions.Data;
err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
check_vk_result_line(err, __LINE__);
#ifdef IMGUI_IMPL_VULKAN_USE_VOLK
volkLoadInstance(g_Instance);
#endif
// Setup the debug report callback
#ifdef APP_USE_VULKAN_DEBUG_REPORT
PFN_vkCreateDebugReportCallbackEXT f_vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
IM_ASSERT(f_vkCreateDebugReportCallbackEXT != NULL);
VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
debug_report_ci.pfnCallback = debug_report;
debug_report_ci.pUserData = NULL;
err = f_vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
check_vk_result_line(err, __LINE__);
#endif
} }
// Select Physical Device (GPU)
g_PhysicalDevice = gpus[use_gpu]; g_PhysicalDevice = ImGui_ImplVulkanH_SelectPhysicalDevice(g_Instance);
free(gpus); IM_ASSERT(g_PhysicalDevice != VK_NULL_HANDLE);
// Select graphics queue family // Select graphics queue family
uint32_t count; g_QueueFamily = ImGui_ImplVulkanH_SelectQueueFamilyIndex(g_PhysicalDevice);
vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, NULL);
VkQueueFamilyProperties* queues = (VkQueueFamilyProperties*)malloc(
sizeof(VkQueueFamilyProperties) * count);
vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, queues);
for (uint32_t i = 0; i < count; i++)
if (queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
{
g_QueueFamily = i;
break;
}
free(queues);
IM_ASSERT(g_QueueFamily != (uint32_t)-1); IM_ASSERT(g_QueueFamily != (uint32_t)-1);
// Create Logical Device (with 1 queue) // Create Logical Device (with 1 queue)
int device_extension_count = 1; {
const char* device_extensions[] = { "VK_KHR_swapchain" }; //ImVector<const char*> device_extensions;
const float queue_priority[] = { 1.0f }; //device_extensions.push_back("VK_KHR_swapchain");
VkDeviceQueueCreateInfo queue_info[1] = { uint32_t device_extensions_count = 1;
[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, const char** device_extensions = (const char**)malloc(device_extensions_count * sizeof(char*));
[0].queueFamilyIndex = g_QueueFamily, device_extensions[0] = "VK_KHR_swapchain";
[0].queueCount = 1,
[0].pQueuePriorities = queue_priority,
};
VkDeviceCreateInfo create_info = {
.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO,
.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]),
.pQueueCreateInfos = queue_info,
.enabledExtensionCount = device_extension_count,
.ppEnabledExtensionNames = device_extensions,
};
err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
check_vk_result(err);
vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
// Create Descriptor Pool // Enumerate physical device extension
VkDescriptorPoolSize pool_sizes[] = { uint32_t properties_count;
{ VK_DESCRIPTOR_TYPE_SAMPLER, 1000 }, //ImVector<VkExtensionProperties> properties;
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1000 }, vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, NULL, &properties_count, NULL);
{ VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1000 }, //properties.resize(properties_count);
{ VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1000 }, VkExtensionProperties* properties = (VkExtensionProperties*)malloc(properties_count * sizeof(VkExtensionProperties));
{ VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1000 }, vkEnumerateDeviceExtensionProperties(g_PhysicalDevice, NULL, &properties_count, properties);
{ VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1000 }, #ifdef VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1000 }, if (IsExtensionAvailable(properties, properties_count, VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME)){
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1000 }, //device_extensions.push_back(VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME);
{ VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1000 }, device_extensions_count++;
{ VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, 1000 }, device_extensions = realloc(device_extensions, device_extensions_count * sizeof(const char*));
{ VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1000 } assert(device_extensions);
}; device_extensions[device_extensions_count-1] = VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME;
VkDescriptorPoolCreateInfo pool_info = {
.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO,
.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT,
.maxSets = 1000 * IM_ARRAYSIZE(pool_sizes),
.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes),
.pPoolSizes = pool_sizes,
};
err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
check_vk_result(err);
} }
#endif
const float queue_priority[] = { 1.0f };
VkDeviceQueueCreateInfo queue_info[1] = {};
queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
queue_info[0].queueFamilyIndex = g_QueueFamily;
queue_info[0].queueCount = 1;
queue_info[0].pQueuePriorities = queue_priority;
VkDeviceCreateInfo create_info = {};
create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
create_info.pQueueCreateInfos = queue_info;
create_info.enabledExtensionCount = device_extensions_count; //(uint32_t)device_extensions.Size;
create_info.ppEnabledExtensionNames = device_extensions;//device_extensions.Data;
err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
check_vk_result_line(err, __LINE__);
vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
}
// Create Descriptor Pool
// If you wish to load e.g. additional textures you may need to alter pools sizes and maxSets.
{
VkDescriptorPoolSize pool_sizes[] =
{
{ VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, IMGUI_IMPL_VULKAN_MINIMUM_IMAGE_SAMPLER_POOL_SIZE },
};
VkDescriptorPoolCreateInfo pool_info = {};
pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
pool_info.maxSets = 0;
//for (VkDescriptorPoolSize& pool_size : pool_sizes)
// pool_info.maxSets += pool_size.descriptorCount;
for(int i = 0; i < IM_ARRAYSIZE(pool_sizes); i++){
VkDescriptorPoolSize pool_size = pool_sizes[i];
pool_info.maxSets += pool_size.descriptorCount;
}
pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
pool_info.pPoolSizes = pool_sizes;
err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
check_vk_result_line(err, __LINE__);
}
}
//*/
// All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo. // All the ImGui_ImplVulkanH_XXX structures/functions are optional helpers used by the demo.
// Your real engine/app may not use them. // Your real engine/app may not use them.
static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface, int width, int height)
int width, int height)
{ {
wd->Surface = surface; wd->Surface = surface;
@@ -219,43 +247,33 @@ static void SetupVulkanWindow(ImGui_ImplVulkanH_Window* wd, VkSurfaceKHR surface
} }
// Select Surface Format // Select Surface Format
const VkFormat requestSurfaceImageFormat[] = { const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM,
VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM
};
const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR; const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat( wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat,
(size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
// Select Present Mode // Select Present Mode
#ifdef IMGUI_UNLIMITED_FRAME_RATE #ifdef APP_USE_UNLIMITED_FRAME_RATE
VkPresentModeKHR present_modes[] = { VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
VK_PRESENT_MODE_MAILBOX_KHR,VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR
};
#else #else
VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR }; VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
#endif #endif
wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode( wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes)); //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
// Create SwapChain, RenderPass, Framebuffer, etc. // Create SwapChain, RenderPass, Framebuffer, etc.
IM_ASSERT(g_MinImageCount >= 2); IM_ASSERT(g_MinImageCount >= 2);
ImGui_ImplVulkanH_CreateOrResizeWindow( ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
g_Instance, g_PhysicalDevice, g_Device, wd, g_QueueFamily, g_Allocator,
width, height, g_MinImageCount);
} }
static void CleanupVulkan() static void CleanupVulkan()
{ {
vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator); vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
#ifdef IMGUI_VULKAN_DEBUG_REPORT #ifdef APP_USE_VULKAN_DEBUG_REPORT
// Remove the debug report callback // Remove the debug report callback
PFN_vkDestroyDebugReportCallbackEXT vkDestroyDebugReportCallbackEXT = PFN_vkDestroyDebugReportCallbackEXT f_vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
(PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT"); f_vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator); #endif // APP_USE_VULKAN_DEBUG_REPORT
#endif // IMGUI_VULKAN_DEBUG_REPORT
vkDestroyDevice(g_Device, g_Allocator); vkDestroyDevice(g_Device, g_Allocator);
vkDestroyInstance(g_Instance, g_Allocator); vkDestroyInstance(g_Instance, g_Allocator);
@@ -268,115 +286,122 @@ static void CleanupVulkanWindow()
static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data) static void FrameRender(ImGui_ImplVulkanH_Window* wd, ImDrawData* draw_data)
{ {
VkResult err; VkSemaphore image_acquired_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].ImageAcquiredSemaphore;
VkSemaphore render_complete_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].RenderCompleteSemaphore;
VkSemaphore image_acquired_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].ImageAcquiredSemaphore; VkResult err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore;
err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
{
g_SwapChainRebuild = true; g_SwapChainRebuild = true;
if (err == VK_ERROR_OUT_OF_DATE_KHR)
return; return;
} if (err != VK_SUBOPTIMAL_KHR)
check_vk_result(err); check_vk_result_line(err, __LINE__);
ImGui_ImplVulkanH_Frame* fd = &wd->Frames[wd->FrameIndex]; ImGui_ImplVulkanH_Frame* fd = &wd->Frames.Data[wd->FrameIndex];
{
err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
check_vk_result(err); check_vk_result_line(err, __LINE__);
err = vkResetFences(g_Device, 1, &fd->Fence); err = vkResetFences(g_Device, 1, &fd->Fence);
check_vk_result(err); check_vk_result_line(err, __LINE__);
}
{
err = vkResetCommandPool(g_Device, fd->CommandPool, 0); err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
check_vk_result(err); check_vk_result_line(err, __LINE__);
VkCommandBufferBeginInfo info = { VkCommandBufferBeginInfo info = {};
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT, info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
};
err = vkBeginCommandBuffer(fd->CommandBuffer, &info); err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
check_vk_result(err); check_vk_result_line(err, __LINE__);
VkRenderPassBeginInfo rp_info = { }
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, {
.renderPass = wd->RenderPass, VkRenderPassBeginInfo info = {};
.framebuffer = fd->Framebuffer, info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
.renderArea.extent.width = wd->Width, info.renderPass = wd->RenderPass;
.renderArea.extent.height = wd->Height, info.framebuffer = fd->Framebuffer;
.clearValueCount = 1, info.renderArea.extent.width = wd->Width;
.pClearValues = &wd->ClearValue, info.renderArea.extent.height = wd->Height;
}; info.clearValueCount = 1;
vkCmdBeginRenderPass(fd->CommandBuffer, &rp_info, VK_SUBPASS_CONTENTS_INLINE); info.pClearValues = &wd->ClearValue;
vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
}
// Record dear imgui primitives into command buffer // Record dear imgui primitives into command buffer
ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer, VK_NULL_HANDLE); ImGui_ImplVulkan_RenderDrawData(draw_data, fd->CommandBuffer, VK_NULL_HANDLE);
// Submit command buffer // Submit command buffer
vkCmdEndRenderPass(fd->CommandBuffer); vkCmdEndRenderPass(fd->CommandBuffer);
{
VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT; VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
VkSubmitInfo sub_info = { VkSubmitInfo info = {};
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO, info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
.waitSemaphoreCount = 1, info.waitSemaphoreCount = 1;
.pWaitSemaphores = &image_acquired_semaphore, info.pWaitSemaphores = &image_acquired_semaphore;
.pWaitDstStageMask = &wait_stage, info.pWaitDstStageMask = &wait_stage;
.commandBufferCount = 1, info.commandBufferCount = 1;
.pCommandBuffers = &fd->CommandBuffer, info.pCommandBuffers = &fd->CommandBuffer;
.signalSemaphoreCount = 1, info.signalSemaphoreCount = 1;
.pSignalSemaphores = &render_complete_semaphore, info.pSignalSemaphores = &render_complete_semaphore;
};
err = vkEndCommandBuffer(fd->CommandBuffer); err = vkEndCommandBuffer(fd->CommandBuffer);
check_vk_result(err); check_vk_result_line(err, __LINE__);
err = vkQueueSubmit(g_Queue, 1, &sub_info, fd->Fence); err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
check_vk_result(err); check_vk_result_line(err, __LINE__);
}
} }
static void FramePresent(ImGui_ImplVulkanH_Window* wd) static void FramePresent(ImGui_ImplVulkanH_Window* wd)
{ {
if (g_SwapChainRebuild) return; if (g_SwapChainRebuild)
VkSemaphore render_complete_semaphore = wd->FrameSemaphores[wd->SemaphoreIndex].RenderCompleteSemaphore; return;
VkPresentInfoKHR info = { VkSemaphore render_complete_semaphore = wd->FrameSemaphores.Data[wd->SemaphoreIndex].RenderCompleteSemaphore;
.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, VkPresentInfoKHR info = {};
.waitSemaphoreCount = 1, info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
.pWaitSemaphores = &render_complete_semaphore, info.waitSemaphoreCount = 1;
.swapchainCount = 1, info.pWaitSemaphores = &render_complete_semaphore;
.pSwapchains = &wd->Swapchain, info.swapchainCount = 1;
.pImageIndices = &wd->FrameIndex, info.pSwapchains = &wd->Swapchain;
}; info.pImageIndices = &wd->FrameIndex;
VkResult err = vkQueuePresentKHR(g_Queue, &info); VkResult err = vkQueuePresentKHR(g_Queue, &info);
if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR) if (err == VK_ERROR_OUT_OF_DATE_KHR || err == VK_SUBOPTIMAL_KHR)
{
g_SwapChainRebuild = true; g_SwapChainRebuild = true;
if (err == VK_ERROR_OUT_OF_DATE_KHR)
return; return;
} if (err != VK_SUBOPTIMAL_KHR)
check_vk_result(err); check_vk_result_line(err, __LINE__);
wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->ImageCount; // Now we can use the next set of semaphores wd->SemaphoreIndex = (wd->SemaphoreIndex + 1) % wd->SemaphoreCount; // Now we can use the next set of semaphores
} }
// Main code
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
// Setup SDL
if (SDL_Init(SDL_INIT_VIDEO) < 0) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0)
SDL_Log("failed to init: %s", SDL_GetError()); {
printf("Error: %s\n", SDL_GetError());
return -1; return -1;
} }
/// Setup window // From 2.0.18: Enable native IME.
SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | #ifdef SDL_HINT_IME_SHOW_UI
SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI); SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1");
SDL_Window* window = SDL_CreateWindow("cImGui SDL2+Vulkan example", #endif
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags);
if (window == NULL) { // Create window with Vulkan graphics context
SDL_Log("Failed to create window: %s", SDL_GetError()); SDL_WindowFlags window_flags = (SDL_WindowFlags)(SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI);
SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, window_flags);
if (window == NULL)
{
printf("Error: SDL_CreateWindow(): %s\n", SDL_GetError());
return -1; return -1;
} }
// Setup Vulkan // Setup Vulkan
uint32_t extensions_count = 0; uint32_t extensions_count = 0;
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, NULL); SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, NULL);
const char** extensions = malloc(extensions_count * sizeof(const char*)); const char** extensions = (const char**)malloc(extensions_count * sizeof(const char*));
SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, extensions); SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, extensions);
SetupVulkan(extensions, extensions_count); SetupVulkan(extensions, extensions_count);
free(extensions); //leak?? but free crashes
// free(extensions);
// Create Window Surface // Create Window Surface
VkSurfaceKHR surface; VkSurfaceKHR surface;
VkResult err; VkResult err;
@@ -392,126 +417,129 @@ int main(int argc, char* argv[])
ImGui_ImplVulkanH_Window* wd = &g_MainWindowData; ImGui_ImplVulkanH_Window* wd = &g_MainWindowData;
SetupVulkanWindow(wd, surface, w, h); SetupVulkanWindow(wd, surface, w, h);
// setup imgui // Setup Dear ImGui context
//IMGUI_CHECKVERSION();
igCreateContext(NULL); igCreateContext(NULL);
ImGuiIO* io = igGetIO(); (void)io;
io->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
io->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
io->ConfigFlags |= ImGuiConfigFlags_DockingEnable; // Enable Docking
io->ConfigFlags |= ImGuiConfigFlags_ViewportsEnable; // Enable Multi-Viewport / Platform Windows
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoTaskBarIcons;
//io.ConfigFlags |= ImGuiConfigFlags_ViewportsNoMerge;
//set docking // Setup Dear ImGui style
ImGuiIO* ioptr = igGetIO(); igStyleColorsDark(NULL);
ioptr->ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls //ImGui::StyleColorsLight();
//ioptr->ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
// When viewports are enabled we tweak WindowRounding/WindowBg so platform windows can look identical to regular ones.
ImGuiStyle* style = igGetStyle();
if (io->ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{
style->WindowRounding = 0.0f;
style->Colors[ImGuiCol_WindowBg].w = 1.0f;
}
// Setup Platform/Renderer backends // Setup Platform/Renderer backends
ImGui_ImplSDL2_InitForVulkan(window); ImGui_ImplSDL2_InitForVulkan(window);
ImGui_ImplVulkan_InitInfo init_info = { ImGui_ImplVulkan_InitInfo init_info = {};
.Instance = g_Instance, init_info.Instance = g_Instance;
.PhysicalDevice = g_PhysicalDevice, init_info.PhysicalDevice = g_PhysicalDevice;
.Device = g_Device, init_info.Device = g_Device;
.QueueFamily = g_QueueFamily, init_info.QueueFamily = g_QueueFamily;
.Queue = g_Queue, init_info.Queue = g_Queue;
.PipelineCache = g_PipelineCache, init_info.PipelineCache = g_PipelineCache;
.DescriptorPool = g_DescriptorPool, init_info.DescriptorPool = g_DescriptorPool;
.Subpass = 0, init_info.RenderPass = wd->RenderPass;
.MinImageCount = g_MinImageCount, init_info.Subpass = 0;
.ImageCount = wd->ImageCount, init_info.MinImageCount = g_MinImageCount;
.MSAASamples = VK_SAMPLE_COUNT_1_BIT, init_info.ImageCount = wd->ImageCount;
.Allocator = g_Allocator, init_info.MSAASamples = VK_SAMPLE_COUNT_1_BIT;
.CheckVkResultFn = check_vk_result init_info.Allocator = g_Allocator;
}; init_info.CheckVkResultFn = check_vk_result;
ImGui_ImplVulkan_Init(&init_info, wd->RenderPass); ImGui_ImplVulkan_Init(&init_info);
igStyleColorsDark(NULL); // Load Fonts
// - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
// - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
// - If the file cannot be loaded, the function will return a nullptr. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
// - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
// - Use '#define IMGUI_ENABLE_FREETYPE' in your imconfig file to use Freetype for higher quality font rendering.
// - Read 'docs/FONTS.md' for more instructions and details.
// - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
//io.Fonts->AddFontDefault();
//io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\segoeui.ttf", 18.0f);
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
//io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
//ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, nullptr, io.Fonts->GetGlyphRangesJapanese());
//IM_ASSERT(font != nullptr);
// Upload Fonts // Our state
// Use any command queue bool show_demo_window = true;
VkCommandPool command_pool = wd->Frames[wd->FrameIndex].CommandPool; bool show_another_window = false;
VkCommandBuffer command_buffer = wd->Frames[wd->FrameIndex].CommandBuffer; ImVec4 clear_color;
clear_color.x = 0.45f;
clear_color.y = 0.55f;
clear_color.z = 0.60f;
clear_color.w = 1.00f;
err = vkResetCommandPool(g_Device, command_pool, 0); // Main loop
check_vk_result(err); bool done = false;
VkCommandBufferBeginInfo begin_info = { while (!done)
.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO,
.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT,
};
err = vkBeginCommandBuffer(command_buffer, &begin_info);
check_vk_result(err);
ImGui_ImplVulkan_CreateFontsTexture(command_buffer);
VkSubmitInfo end_info = {
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
.commandBufferCount = 1,
.pCommandBuffers = &command_buffer,
};
err = vkEndCommandBuffer(command_buffer);
check_vk_result(err);
err = vkQueueSubmit(g_Queue, 1, &end_info, VK_NULL_HANDLE);
check_vk_result(err);
err = vkDeviceWaitIdle(g_Device);
check_vk_result(err);
ImGui_ImplVulkan_DestroyFontUploadObjects();
bool showDemoWindow = true;
bool showAnotherWindow = false;
ImVec4 clearColor;
clearColor.x = 0.45f;
clearColor.y = 0.55f;
clearColor.z = 0.60f;
clearColor.w = 1.00f;
bool quit = false;
while (!quit)
{ {
SDL_Event e; // Poll and handle events (inputs, window resize, etc.)
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// we need to call SDL_PollEvent to let window rendered, otherwise // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
// no window will be shown // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
while (SDL_PollEvent(&e) != 0) // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
SDL_Event event;
while (SDL_PollEvent(&event))
{ {
ImGui_ImplSDL2_ProcessEvent(&e); ImGui_ImplSDL2_ProcessEvent(&event);
if (e.type == SDL_QUIT) if (event.type == SDL_QUIT)
quit = true; done = true;
if (e.type == SDL_WINDOWEVENT && e.window.event == SDL_WINDOWEVENT_CLOSE && if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
e.window.windowID == SDL_GetWindowID(window)) done = true;
quit = true; }
if (SDL_GetWindowFlags(window) & SDL_WINDOW_MINIMIZED)
{
SDL_Delay(10);
continue;
} }
// Resize swap chain // Resize swap chain?
if (g_SwapChainRebuild) int fb_width, fb_height;
{ SDL_GetWindowSize(window, &fb_width, &fb_height);
int width, height; if (fb_width > 0 && fb_height > 0 && (g_SwapChainRebuild || g_MainWindowData.Width != fb_width || g_MainWindowData.Height != fb_height))
SDL_GetWindowSize(window, &width, &height);
if (width > 0 && height > 0)
{ {
ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount); ImGui_ImplVulkan_SetMinImageCount(g_MinImageCount);
ImGui_ImplVulkanH_CreateOrResizeWindow( ImGui_ImplVulkanH_CreateOrResizeWindow(g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData, g_QueueFamily, g_Allocator, fb_width, fb_height, g_MinImageCount);
g_Instance, g_PhysicalDevice, g_Device, &g_MainWindowData,
g_QueueFamily, g_Allocator, width, height, g_MinImageCount);
g_MainWindowData.FrameIndex = 0; g_MainWindowData.FrameIndex = 0;
g_SwapChainRebuild = false; g_SwapChainRebuild = false;
} }
}
// start imgui frame // Start the Dear ImGui frame
ImGui_ImplVulkan_NewFrame(); ImGui_ImplVulkan_NewFrame();
ImGui_ImplSDL2_NewFrame(); ImGui_ImplSDL2_NewFrame();
igNewFrame(); igNewFrame();
if (showDemoWindow) // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
igShowDemoWindow(&showDemoWindow); if (show_demo_window)
igShowDemoWindow(&show_demo_window);
// show a simple window that we created ourselves. // 2. Show a simple window that we create ourselves. We use a Begin/End pair to create a named window.
{ {
static float f = 0.0f; static float f = 0.0f;
static int counter = 0; static int counter = 0;
igBegin("Hello, world!", NULL, 0); igBegin("Hello, world!", NULL, 0);
igText("This is some useful text"); igText("This is some useful text");
igCheckbox("Demo window", &showDemoWindow); igCheckbox("Demo window", &show_demo_window);
igCheckbox("Another window", &showAnotherWindow); igCheckbox("Another window", &show_another_window);
igSliderFloat("Float", &f, 0.0f, 1.0f, "%.3f", 0); igSliderFloat("Float", &f, 0.0f, 1.0f, "%.3f", 0);
igColorEdit3("clear color", (float*)&clearColor, 0); igColorEdit3("clear color", (float*)&clear_color, 0);
ImVec2 buttonSize; ImVec2 buttonSize;
buttonSize.x = 0; buttonSize.x = 0;
@@ -526,37 +554,46 @@ int main(int argc, char* argv[])
igEnd(); igEnd();
} }
if (showAnotherWindow) // 3. Show another simple window.
if (show_another_window)
{ {
igBegin("imgui Another Window", &showAnotherWindow, 0); igBegin("imgui Another Window", &show_another_window, 0);
igText("Hello from imgui"); igText("Hello from imgui");
ImVec2 buttonSize; ImVec2 buttonSize;
buttonSize.x = 0; buttonSize.y = 0; buttonSize.x = 0; buttonSize.y = 0;
if (igButton("Close me", buttonSize)) if (igButton("Close me", buttonSize))
{ {
showAnotherWindow = false; show_another_window = false;
} }
igEnd(); igEnd();
} }
// render // Rendering
igRender(); igRender();
ImDrawData* draw_data = igGetDrawData(); ImDrawData* main_draw_data = igGetDrawData();
const bool is_minimized = (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f); const bool main_is_minimized = (main_draw_data->DisplaySize.x <= 0.0f || main_draw_data->DisplaySize.y <= 0.0f);
if (!is_minimized) wd->ClearValue.color.float32[0] = clear_color.x * clear_color.w;
wd->ClearValue.color.float32[1] = clear_color.y * clear_color.w;
wd->ClearValue.color.float32[2] = clear_color.z * clear_color.w;
wd->ClearValue.color.float32[3] = clear_color.w;
if (!main_is_minimized)
FrameRender(wd, main_draw_data);
// Update and Render additional Platform Windows
if (io->ConfigFlags & ImGuiConfigFlags_ViewportsEnable)
{ {
wd->ClearValue.color.float32[0] = clearColor.x * clearColor.w; igUpdatePlatformWindows();
wd->ClearValue.color.float32[1] = clearColor.y * clearColor.w; igRenderPlatformWindowsDefault(NULL, NULL);
wd->ClearValue.color.float32[2] = clearColor.z * clearColor.w;
wd->ClearValue.color.float32[3] = clearColor.w;
FrameRender(wd, draw_data);
FramePresent(wd);
} }
// Present Main Platform Window
if (!main_is_minimized)
FramePresent(wd);
} }
// Cleanup // Cleanup
err = vkDeviceWaitIdle(g_Device); err = vkDeviceWaitIdle(g_Device);
check_vk_result(err); check_vk_result_line(err, __LINE__);
ImGui_ImplVulkan_Shutdown(); ImGui_ImplVulkan_Shutdown();
ImGui_ImplSDL2_Shutdown(); ImGui_ImplSDL2_Shutdown();
igDestroyContext(NULL); igDestroyContext(NULL);

View File

@@ -1,7 +1,8 @@
//This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui //This file is automatically generated by generator.lua from https://github.com/cimgui/cimgui
//based on imgui.h file version "1.91.6" 19160 from Dear ImGui https://github.com/ocornut/imgui //based on imgui.h file version "1.91.8" 19180 from Dear ImGui https://github.com/ocornut/imgui
//with imgui_internal.h api //with imgui_internal.h api
//with imgui_freetype.h api //with imgui_freetype.h api
//docking branch
#include "./imgui/imgui.h" #include "./imgui/imgui.h"
#ifdef IMGUI_ENABLE_FREETYPE #ifdef IMGUI_ENABLE_FREETYPE
@@ -172,6 +173,10 @@ CIMGUI_API ImDrawList* igGetWindowDrawList()
{ {
return ImGui::GetWindowDrawList(); return ImGui::GetWindowDrawList();
} }
CIMGUI_API float igGetWindowDpiScale()
{
return ImGui::GetWindowDpiScale();
}
CIMGUI_API void igGetWindowPos(ImVec2 *pOut) CIMGUI_API void igGetWindowPos(ImVec2 *pOut)
{ {
*pOut = ImGui::GetWindowPos(); *pOut = ImGui::GetWindowPos();
@@ -188,6 +193,10 @@ CIMGUI_API float igGetWindowHeight()
{ {
return ImGui::GetWindowHeight(); return ImGui::GetWindowHeight();
} }
CIMGUI_API ImGuiViewport* igGetWindowViewport()
{
return ImGui::GetWindowViewport();
}
CIMGUI_API void igSetNextWindowPos(const ImVec2 pos,ImGuiCond cond,const ImVec2 pivot) CIMGUI_API void igSetNextWindowPos(const ImVec2 pos,ImGuiCond cond,const ImVec2 pivot)
{ {
return ImGui::SetNextWindowPos(pos,cond,pivot); return ImGui::SetNextWindowPos(pos,cond,pivot);
@@ -220,6 +229,10 @@ CIMGUI_API void igSetNextWindowBgAlpha(float alpha)
{ {
return ImGui::SetNextWindowBgAlpha(alpha); return ImGui::SetNextWindowBgAlpha(alpha);
} }
CIMGUI_API void igSetNextWindowViewport(ImGuiID viewport_id)
{
return ImGui::SetNextWindowViewport(viewport_id);
}
CIMGUI_API void igSetWindowPos_Vec2(const ImVec2 pos,ImGuiCond cond) CIMGUI_API void igSetWindowPos_Vec2(const ImVec2 pos,ImGuiCond cond)
{ {
return ImGui::SetWindowPos(pos,cond); return ImGui::SetWindowPos(pos,cond);
@@ -1268,6 +1281,30 @@ CIMGUI_API void igSetTabItemClosed(const char* tab_or_docked_window_label)
{ {
return ImGui::SetTabItemClosed(tab_or_docked_window_label); return ImGui::SetTabItemClosed(tab_or_docked_window_label);
} }
CIMGUI_API ImGuiID igDockSpace(ImGuiID dockspace_id,const ImVec2 size,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
{
return ImGui::DockSpace(dockspace_id,size,flags,window_class);
}
CIMGUI_API ImGuiID igDockSpaceOverViewport(ImGuiID dockspace_id,const ImGuiViewport* viewport,ImGuiDockNodeFlags flags,const ImGuiWindowClass* window_class)
{
return ImGui::DockSpaceOverViewport(dockspace_id,viewport,flags,window_class);
}
CIMGUI_API void igSetNextWindowDockID(ImGuiID dock_id,ImGuiCond cond)
{
return ImGui::SetNextWindowDockID(dock_id,cond);
}
CIMGUI_API void igSetNextWindowClass(const ImGuiWindowClass* window_class)
{
return ImGui::SetNextWindowClass(window_class);
}
CIMGUI_API ImGuiID igGetWindowDockID()
{
return ImGui::GetWindowDockID();
}
CIMGUI_API bool igIsWindowDocked()
{
return ImGui::IsWindowDocked();
}
CIMGUI_API void igLogToTTY(int auto_open_depth) CIMGUI_API void igLogToTTY(int auto_open_depth)
{ {
return ImGui::LogToTTY(auto_open_depth); return ImGui::LogToTTY(auto_open_depth);
@@ -1424,13 +1461,13 @@ CIMGUI_API ImGuiViewport* igGetMainViewport()
{ {
return ImGui::GetMainViewport(); return ImGui::GetMainViewport();
} }
CIMGUI_API ImDrawList* igGetBackgroundDrawList_Nil() CIMGUI_API ImDrawList* igGetBackgroundDrawList(ImGuiViewport* viewport)
{ {
return ImGui::GetBackgroundDrawList(); return ImGui::GetBackgroundDrawList(viewport);
} }
CIMGUI_API ImDrawList* igGetForegroundDrawList_Nil() CIMGUI_API ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport)
{ {
return ImGui::GetForegroundDrawList(); return ImGui::GetForegroundDrawList(viewport);
} }
CIMGUI_API bool igIsRectVisible_Nil(const ImVec2 size) CIMGUI_API bool igIsRectVisible_Nil(const ImVec2 size)
{ {
@@ -1540,6 +1577,10 @@ CIMGUI_API bool igIsMouseDoubleClicked_Nil(ImGuiMouseButton button)
{ {
return ImGui::IsMouseDoubleClicked(button); return ImGui::IsMouseDoubleClicked(button);
} }
CIMGUI_API bool igIsMouseReleasedWithDelay(ImGuiMouseButton button,float delay)
{
return ImGui::IsMouseReleasedWithDelay(button,delay);
}
CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button) CIMGUI_API int igGetMouseClickedCount(ImGuiMouseButton button)
{ {
return ImGui::GetMouseClickedCount(button); return ImGui::GetMouseClickedCount(button);
@@ -1655,6 +1696,26 @@ CIMGUI_API void igMemFree(void* ptr)
{ {
return ImGui::MemFree(ptr); return ImGui::MemFree(ptr);
} }
CIMGUI_API void igUpdatePlatformWindows()
{
return ImGui::UpdatePlatformWindows();
}
CIMGUI_API void igRenderPlatformWindowsDefault(void* platform_render_arg,void* renderer_render_arg)
{
return ImGui::RenderPlatformWindowsDefault(platform_render_arg,renderer_render_arg);
}
CIMGUI_API void igDestroyPlatformWindows()
{
return ImGui::DestroyPlatformWindows();
}
CIMGUI_API ImGuiViewport* igFindViewportByID(ImGuiID id)
{
return ImGui::FindViewportByID(id);
}
CIMGUI_API ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle)
{
return ImGui::FindViewportByPlatformHandle(platform_handle);
}
CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void) CIMGUI_API ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(void)
{ {
return IM_NEW(ImGuiTableSortSpecs)(); return IM_NEW(ImGuiTableSortSpecs)();
@@ -1707,6 +1768,10 @@ CIMGUI_API void ImGuiIO_AddMouseSourceEvent(ImGuiIO* self,ImGuiMouseSource sourc
{ {
return self->AddMouseSourceEvent(source); return self->AddMouseSourceEvent(source);
} }
CIMGUI_API void ImGuiIO_AddMouseViewportEvent(ImGuiIO* self,ImGuiID id)
{
return self->AddMouseViewportEvent(id);
}
CIMGUI_API void ImGuiIO_AddFocusEvent(ImGuiIO* self,bool focused) CIMGUI_API void ImGuiIO_AddFocusEvent(ImGuiIO* self,bool focused)
{ {
return self->AddFocusEvent(focused); return self->AddFocusEvent(focused);
@@ -1779,6 +1844,14 @@ CIMGUI_API bool ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackDa
{ {
return self->HasSelection(); return self->HasSelection();
} }
CIMGUI_API ImGuiWindowClass* ImGuiWindowClass_ImGuiWindowClass(void)
{
return IM_NEW(ImGuiWindowClass)();
}
CIMGUI_API void ImGuiWindowClass_destroy(ImGuiWindowClass* self)
{
IM_DELETE(self);
}
CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void) CIMGUI_API ImGuiPayload* ImGuiPayload_ImGuiPayload(void)
{ {
return IM_NEW(ImGuiPayload)(); return IM_NEW(ImGuiPayload)();
@@ -2527,14 +2600,14 @@ CIMGUI_API void ImFontAtlas_ClearInputData(ImFontAtlas* self)
{ {
return self->ClearInputData(); return self->ClearInputData();
} }
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* self)
{
return self->ClearTexData();
}
CIMGUI_API void ImFontAtlas_ClearFonts(ImFontAtlas* self) CIMGUI_API void ImFontAtlas_ClearFonts(ImFontAtlas* self)
{ {
return self->ClearFonts(); return self->ClearFonts();
} }
CIMGUI_API void ImFontAtlas_ClearTexData(ImFontAtlas* self)
{
return self->ClearTexData();
}
CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self) CIMGUI_API void ImFontAtlas_Clear(ImFontAtlas* self)
{ {
return self->Clear(); return self->Clear();
@@ -2711,6 +2784,14 @@ CIMGUI_API void ImGuiPlatformIO_destroy(ImGuiPlatformIO* self)
{ {
IM_DELETE(self); IM_DELETE(self);
} }
CIMGUI_API ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor(void)
{
return IM_NEW(ImGuiPlatformMonitor)();
}
CIMGUI_API void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self)
{
IM_DELETE(self);
}
CIMGUI_API ImGuiPlatformImeData* ImGuiPlatformImeData_ImGuiPlatformImeData(void) CIMGUI_API ImGuiPlatformImeData* ImGuiPlatformImeData_ImGuiPlatformImeData(void)
{ {
return IM_NEW(ImGuiPlatformImeData)(); return IM_NEW(ImGuiPlatformImeData)();
@@ -3642,6 +3723,70 @@ CIMGUI_API void ImGuiMultiSelectState_destroy(ImGuiMultiSelectState* self)
{ {
IM_DELETE(self); IM_DELETE(self);
} }
CIMGUI_API ImGuiDockNode* ImGuiDockNode_ImGuiDockNode(ImGuiID id)
{
return IM_NEW(ImGuiDockNode)(id);
}
CIMGUI_API void ImGuiDockNode_destroy(ImGuiDockNode* self)
{
IM_DELETE(self);
}
CIMGUI_API bool ImGuiDockNode_IsRootNode(ImGuiDockNode* self)
{
return self->IsRootNode();
}
CIMGUI_API bool ImGuiDockNode_IsDockSpace(ImGuiDockNode* self)
{
return self->IsDockSpace();
}
CIMGUI_API bool ImGuiDockNode_IsFloatingNode(ImGuiDockNode* self)
{
return self->IsFloatingNode();
}
CIMGUI_API bool ImGuiDockNode_IsCentralNode(ImGuiDockNode* self)
{
return self->IsCentralNode();
}
CIMGUI_API bool ImGuiDockNode_IsHiddenTabBar(ImGuiDockNode* self)
{
return self->IsHiddenTabBar();
}
CIMGUI_API bool ImGuiDockNode_IsNoTabBar(ImGuiDockNode* self)
{
return self->IsNoTabBar();
}
CIMGUI_API bool ImGuiDockNode_IsSplitNode(ImGuiDockNode* self)
{
return self->IsSplitNode();
}
CIMGUI_API bool ImGuiDockNode_IsLeafNode(ImGuiDockNode* self)
{
return self->IsLeafNode();
}
CIMGUI_API bool ImGuiDockNode_IsEmpty(ImGuiDockNode* self)
{
return self->IsEmpty();
}
CIMGUI_API void ImGuiDockNode_Rect(ImRect *pOut,ImGuiDockNode* self)
{
*pOut = self->Rect();
}
CIMGUI_API void ImGuiDockNode_SetLocalFlags(ImGuiDockNode* self,ImGuiDockNodeFlags flags)
{
return self->SetLocalFlags(flags);
}
CIMGUI_API void ImGuiDockNode_UpdateMergedFlags(ImGuiDockNode* self)
{
return self->UpdateMergedFlags();
}
CIMGUI_API ImGuiDockContext* ImGuiDockContext_ImGuiDockContext(void)
{
return IM_NEW(ImGuiDockContext)();
}
CIMGUI_API void ImGuiDockContext_destroy(ImGuiDockContext* self)
{
IM_DELETE(self);
}
CIMGUI_API ImGuiViewportP* ImGuiViewportP_ImGuiViewportP(void) CIMGUI_API ImGuiViewportP* ImGuiViewportP_ImGuiViewportP(void)
{ {
return IM_NEW(ImGuiViewportP)(); return IM_NEW(ImGuiViewportP)();
@@ -3650,6 +3795,10 @@ CIMGUI_API void ImGuiViewportP_destroy(ImGuiViewportP* self)
{ {
IM_DELETE(self); IM_DELETE(self);
} }
CIMGUI_API void ImGuiViewportP_ClearRequestFlags(ImGuiViewportP* self)
{
return self->ClearRequestFlags();
}
CIMGUI_API void ImGuiViewportP_CalcWorkRectPos(ImVec2 *pOut,ImGuiViewportP* self,const ImVec2 inset_min) CIMGUI_API void ImGuiViewportP_CalcWorkRectPos(ImVec2 *pOut,ImGuiViewportP* self,const ImVec2 inset_min)
{ {
*pOut = self->CalcWorkRectPos(inset_min); *pOut = self->CalcWorkRectPos(inset_min);
@@ -3850,6 +3999,10 @@ CIMGUI_API ImGuiIO* igGetIOEx(ImGuiContext* ctx)
{ {
return &ImGui::GetIOEx(ctx); return &ImGui::GetIOEx(ctx);
} }
CIMGUI_API ImGuiPlatformIO* igGetPlatformIOEx(ImGuiContext* ctx)
{
return &ImGui::GetPlatformIOEx(ctx);
}
CIMGUI_API ImGuiWindow* igGetCurrentWindowRead() CIMGUI_API ImGuiWindow* igGetCurrentWindowRead()
{ {
return ImGui::GetCurrentWindowRead(); return ImGui::GetCurrentWindowRead();
@@ -3878,9 +4031,9 @@ CIMGUI_API void igCalcWindowNextAutoFitSize(ImVec2 *pOut,ImGuiWindow* window)
{ {
*pOut = ImGui::CalcWindowNextAutoFitSize(window); *pOut = ImGui::CalcWindowNextAutoFitSize(window);
} }
CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent,bool popup_hierarchy) CIMGUI_API bool igIsWindowChildOf(ImGuiWindow* window,ImGuiWindow* potential_parent,bool popup_hierarchy,bool dock_hierarchy)
{ {
return ImGui::IsWindowChildOf(window,potential_parent,popup_hierarchy); return ImGui::IsWindowChildOf(window,potential_parent,popup_hierarchy,dock_hierarchy);
} }
CIMGUI_API bool igIsWindowWithinBeginStackOf(ImGuiWindow* window,ImGuiWindow* potential_parent) CIMGUI_API bool igIsWindowWithinBeginStackOf(ImGuiWindow* window,ImGuiWindow* potential_parent)
{ {
@@ -3978,18 +4131,14 @@ CIMGUI_API ImFont* igGetDefaultFont()
{ {
return ImGui::GetDefaultFont(); return ImGui::GetDefaultFont();
} }
CIMGUI_API void igPushPasswordFont()
{
return ImGui::PushPasswordFont();
}
CIMGUI_API ImDrawList* igGetForegroundDrawList_WindowPtr(ImGuiWindow* window) CIMGUI_API ImDrawList* igGetForegroundDrawList_WindowPtr(ImGuiWindow* window)
{ {
return ImGui::GetForegroundDrawList(window); return ImGui::GetForegroundDrawList(window);
} }
CIMGUI_API ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport)
{
return ImGui::GetBackgroundDrawList(viewport);
}
CIMGUI_API ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport)
{
return ImGui::GetForegroundDrawList(viewport);
}
CIMGUI_API void igAddDrawListToDrawDataEx(ImDrawData* draw_data,ImVector_ImDrawListPtr* out_list,ImDrawList* draw_list) CIMGUI_API void igAddDrawListToDrawDataEx(ImDrawData* draw_data,ImVector_ImDrawListPtr* out_list,ImDrawList* draw_list)
{ {
return ImGui::AddDrawListToDrawDataEx(draw_data,out_list,draw_list); return ImGui::AddDrawListToDrawDataEx(draw_data,out_list,draw_list);
@@ -4018,6 +4167,10 @@ CIMGUI_API void igStartMouseMovingWindow(ImGuiWindow* window)
{ {
return ImGui::StartMouseMovingWindow(window); return ImGui::StartMouseMovingWindow(window);
} }
CIMGUI_API void igStartMouseMovingWindowOrNode(ImGuiWindow* window,ImGuiDockNode* node,bool undock)
{
return ImGui::StartMouseMovingWindowOrNode(window,node,undock);
}
CIMGUI_API void igUpdateMouseMovingWindowNewFrame() CIMGUI_API void igUpdateMouseMovingWindowNewFrame()
{ {
return ImGui::UpdateMouseMovingWindowNewFrame(); return ImGui::UpdateMouseMovingWindowNewFrame();
@@ -4038,10 +4191,34 @@ CIMGUI_API void igCallContextHooks(ImGuiContext* context,ImGuiContextHookType ty
{ {
return ImGui::CallContextHooks(context,type); return ImGui::CallContextHooks(context,type);
} }
CIMGUI_API void igTranslateWindowsInViewport(ImGuiViewportP* viewport,const ImVec2 old_pos,const ImVec2 new_pos,const ImVec2 old_size,const ImVec2 new_size)
{
return ImGui::TranslateWindowsInViewport(viewport,old_pos,new_pos,old_size,new_size);
}
CIMGUI_API void igScaleWindowsInViewport(ImGuiViewportP* viewport,float scale)
{
return ImGui::ScaleWindowsInViewport(viewport,scale);
}
CIMGUI_API void igDestroyPlatformWindow(ImGuiViewportP* viewport)
{
return ImGui::DestroyPlatformWindow(viewport);
}
CIMGUI_API void igSetWindowViewport(ImGuiWindow* window,ImGuiViewportP* viewport) CIMGUI_API void igSetWindowViewport(ImGuiWindow* window,ImGuiViewportP* viewport)
{ {
return ImGui::SetWindowViewport(window,viewport); return ImGui::SetWindowViewport(window,viewport);
} }
CIMGUI_API void igSetCurrentViewport(ImGuiWindow* window,ImGuiViewportP* viewport)
{
return ImGui::SetCurrentViewport(window,viewport);
}
CIMGUI_API const ImGuiPlatformMonitor* igGetViewportPlatformMonitor(ImGuiViewport* viewport)
{
return ImGui::GetViewportPlatformMonitor(viewport);
}
CIMGUI_API ImGuiViewportP* igFindHoveredViewportFromPlatformWindowStack(const ImVec2 mouse_platform_pos)
{
return ImGui::FindHoveredViewportFromPlatformWindowStack(mouse_platform_pos);
}
CIMGUI_API void igMarkIniSettingsDirty_Nil() CIMGUI_API void igMarkIniSettingsDirty_Nil()
{ {
return ImGui::MarkIniSettingsDirty(); return ImGui::MarkIniSettingsDirty();
@@ -4202,9 +4379,9 @@ CIMGUI_API bool igIsClippedEx(const ImRect bb,ImGuiID id)
{ {
return ImGui::IsClippedEx(bb,id); return ImGui::IsClippedEx(bb,id);
} }
CIMGUI_API void igSetLastItemData(ImGuiID item_id,ImGuiItemFlags in_flags,ImGuiItemStatusFlags status_flags,const ImRect item_rect) CIMGUI_API void igSetLastItemData(ImGuiID item_id,ImGuiItemFlags item_flags,ImGuiItemStatusFlags status_flags,const ImRect item_rect)
{ {
return ImGui::SetLastItemData(item_id,in_flags,status_flags,item_rect); return ImGui::SetLastItemData(item_id,item_flags,status_flags,item_rect);
} }
CIMGUI_API void igCalcItemSize(ImVec2 *pOut,ImVec2 size,float default_w,float default_h) CIMGUI_API void igCalcItemSize(ImVec2 *pOut,ImVec2 size,float default_w,float default_h)
{ {
@@ -4570,6 +4747,174 @@ CIMGUI_API ImGuiKeyRoutingData* igGetShortcutRoutingData(ImGuiKeyChord key_chord
{ {
return ImGui::GetShortcutRoutingData(key_chord); return ImGui::GetShortcutRoutingData(key_chord);
} }
CIMGUI_API void igDockContextInitialize(ImGuiContext* ctx)
{
return ImGui::DockContextInitialize(ctx);
}
CIMGUI_API void igDockContextShutdown(ImGuiContext* ctx)
{
return ImGui::DockContextShutdown(ctx);
}
CIMGUI_API void igDockContextClearNodes(ImGuiContext* ctx,ImGuiID root_id,bool clear_settings_refs)
{
return ImGui::DockContextClearNodes(ctx,root_id,clear_settings_refs);
}
CIMGUI_API void igDockContextRebuildNodes(ImGuiContext* ctx)
{
return ImGui::DockContextRebuildNodes(ctx);
}
CIMGUI_API void igDockContextNewFrameUpdateUndocking(ImGuiContext* ctx)
{
return ImGui::DockContextNewFrameUpdateUndocking(ctx);
}
CIMGUI_API void igDockContextNewFrameUpdateDocking(ImGuiContext* ctx)
{
return ImGui::DockContextNewFrameUpdateDocking(ctx);
}
CIMGUI_API void igDockContextEndFrame(ImGuiContext* ctx)
{
return ImGui::DockContextEndFrame(ctx);
}
CIMGUI_API ImGuiID igDockContextGenNodeID(ImGuiContext* ctx)
{
return ImGui::DockContextGenNodeID(ctx);
}
CIMGUI_API void igDockContextQueueDock(ImGuiContext* ctx,ImGuiWindow* target,ImGuiDockNode* target_node,ImGuiWindow* payload,ImGuiDir split_dir,float split_ratio,bool split_outer)
{
return ImGui::DockContextQueueDock(ctx,target,target_node,payload,split_dir,split_ratio,split_outer);
}
CIMGUI_API void igDockContextQueueUndockWindow(ImGuiContext* ctx,ImGuiWindow* window)
{
return ImGui::DockContextQueueUndockWindow(ctx,window);
}
CIMGUI_API void igDockContextQueueUndockNode(ImGuiContext* ctx,ImGuiDockNode* node)
{
return ImGui::DockContextQueueUndockNode(ctx,node);
}
CIMGUI_API void igDockContextProcessUndockWindow(ImGuiContext* ctx,ImGuiWindow* window,bool clear_persistent_docking_ref)
{
return ImGui::DockContextProcessUndockWindow(ctx,window,clear_persistent_docking_ref);
}
CIMGUI_API void igDockContextProcessUndockNode(ImGuiContext* ctx,ImGuiDockNode* node)
{
return ImGui::DockContextProcessUndockNode(ctx,node);
}
CIMGUI_API bool igDockContextCalcDropPosForDocking(ImGuiWindow* target,ImGuiDockNode* target_node,ImGuiWindow* payload_window,ImGuiDockNode* payload_node,ImGuiDir split_dir,bool split_outer,ImVec2* out_pos)
{
return ImGui::DockContextCalcDropPosForDocking(target,target_node,payload_window,payload_node,split_dir,split_outer,out_pos);
}
CIMGUI_API ImGuiDockNode* igDockContextFindNodeByID(ImGuiContext* ctx,ImGuiID id)
{
return ImGui::DockContextFindNodeByID(ctx,id);
}
CIMGUI_API void igDockNodeWindowMenuHandler_Default(ImGuiContext* ctx,ImGuiDockNode* node,ImGuiTabBar* tab_bar)
{
return ImGui::DockNodeWindowMenuHandler_Default(ctx,node,tab_bar);
}
CIMGUI_API bool igDockNodeBeginAmendTabBar(ImGuiDockNode* node)
{
return ImGui::DockNodeBeginAmendTabBar(node);
}
CIMGUI_API void igDockNodeEndAmendTabBar()
{
return ImGui::DockNodeEndAmendTabBar();
}
CIMGUI_API ImGuiDockNode* igDockNodeGetRootNode(ImGuiDockNode* node)
{
return ImGui::DockNodeGetRootNode(node);
}
CIMGUI_API bool igDockNodeIsInHierarchyOf(ImGuiDockNode* node,ImGuiDockNode* parent)
{
return ImGui::DockNodeIsInHierarchyOf(node,parent);
}
CIMGUI_API int igDockNodeGetDepth(const ImGuiDockNode* node)
{
return ImGui::DockNodeGetDepth(node);
}
CIMGUI_API ImGuiID igDockNodeGetWindowMenuButtonId(const ImGuiDockNode* node)
{
return ImGui::DockNodeGetWindowMenuButtonId(node);
}
CIMGUI_API ImGuiDockNode* igGetWindowDockNode()
{
return ImGui::GetWindowDockNode();
}
CIMGUI_API bool igGetWindowAlwaysWantOwnTabBar(ImGuiWindow* window)
{
return ImGui::GetWindowAlwaysWantOwnTabBar(window);
}
CIMGUI_API void igBeginDocked(ImGuiWindow* window,bool* p_open)
{
return ImGui::BeginDocked(window,p_open);
}
CIMGUI_API void igBeginDockableDragDropSource(ImGuiWindow* window)
{
return ImGui::BeginDockableDragDropSource(window);
}
CIMGUI_API void igBeginDockableDragDropTarget(ImGuiWindow* window)
{
return ImGui::BeginDockableDragDropTarget(window);
}
CIMGUI_API void igSetWindowDock(ImGuiWindow* window,ImGuiID dock_id,ImGuiCond cond)
{
return ImGui::SetWindowDock(window,dock_id,cond);
}
CIMGUI_API void igDockBuilderDockWindow(const char* window_name,ImGuiID node_id)
{
return ImGui::DockBuilderDockWindow(window_name,node_id);
}
CIMGUI_API ImGuiDockNode* igDockBuilderGetNode(ImGuiID node_id)
{
return ImGui::DockBuilderGetNode(node_id);
}
CIMGUI_API ImGuiDockNode* igDockBuilderGetCentralNode(ImGuiID node_id)
{
return ImGui::DockBuilderGetCentralNode(node_id);
}
CIMGUI_API ImGuiID igDockBuilderAddNode(ImGuiID node_id,ImGuiDockNodeFlags flags)
{
return ImGui::DockBuilderAddNode(node_id,flags);
}
CIMGUI_API void igDockBuilderRemoveNode(ImGuiID node_id)
{
return ImGui::DockBuilderRemoveNode(node_id);
}
CIMGUI_API void igDockBuilderRemoveNodeDockedWindows(ImGuiID node_id,bool clear_settings_refs)
{
return ImGui::DockBuilderRemoveNodeDockedWindows(node_id,clear_settings_refs);
}
CIMGUI_API void igDockBuilderRemoveNodeChildNodes(ImGuiID node_id)
{
return ImGui::DockBuilderRemoveNodeChildNodes(node_id);
}
CIMGUI_API void igDockBuilderSetNodePos(ImGuiID node_id,ImVec2 pos)
{
return ImGui::DockBuilderSetNodePos(node_id,pos);
}
CIMGUI_API void igDockBuilderSetNodeSize(ImGuiID node_id,ImVec2 size)
{
return ImGui::DockBuilderSetNodeSize(node_id,size);
}
CIMGUI_API ImGuiID igDockBuilderSplitNode(ImGuiID node_id,ImGuiDir split_dir,float size_ratio_for_node_at_dir,ImGuiID* out_id_at_dir,ImGuiID* out_id_at_opposite_dir)
{
return ImGui::DockBuilderSplitNode(node_id,split_dir,size_ratio_for_node_at_dir,out_id_at_dir,out_id_at_opposite_dir);
}
CIMGUI_API void igDockBuilderCopyDockSpace(ImGuiID src_dockspace_id,ImGuiID dst_dockspace_id,ImVector_const_charPtr* in_window_remap_pairs)
{
return ImGui::DockBuilderCopyDockSpace(src_dockspace_id,dst_dockspace_id,in_window_remap_pairs);
}
CIMGUI_API void igDockBuilderCopyNode(ImGuiID src_node_id,ImGuiID dst_node_id,ImVector_ImGuiID* out_node_remap_pairs)
{
return ImGui::DockBuilderCopyNode(src_node_id,dst_node_id,out_node_remap_pairs);
}
CIMGUI_API void igDockBuilderCopyWindowSettings(const char* src_name,const char* dst_name)
{
return ImGui::DockBuilderCopyWindowSettings(src_name,dst_name);
}
CIMGUI_API void igDockBuilderFinish(ImGuiID node_id)
{
return ImGui::DockBuilderFinish(node_id);
}
CIMGUI_API void igPushFocusScope(ImGuiID id) CIMGUI_API void igPushFocusScope(ImGuiID id)
{ {
return ImGui::PushFocusScope(id); return ImGui::PushFocusScope(id);
@@ -4906,6 +5251,10 @@ CIMGUI_API ImGuiTabItem* igTabBarFindTabByOrder(ImGuiTabBar* tab_bar,int order)
{ {
return ImGui::TabBarFindTabByOrder(tab_bar,order); return ImGui::TabBarFindTabByOrder(tab_bar,order);
} }
CIMGUI_API ImGuiTabItem* igTabBarFindMostRecentlySelectedTabForActiveWindow(ImGuiTabBar* tab_bar)
{
return ImGui::TabBarFindMostRecentlySelectedTabForActiveWindow(tab_bar);
}
CIMGUI_API ImGuiTabItem* igTabBarGetCurrentTab(ImGuiTabBar* tab_bar) CIMGUI_API ImGuiTabItem* igTabBarGetCurrentTab(ImGuiTabBar* tab_bar)
{ {
return ImGui::TabBarGetCurrentTab(tab_bar); return ImGui::TabBarGetCurrentTab(tab_bar);
@@ -4918,6 +5267,10 @@ CIMGUI_API const char* igTabBarGetTabName(ImGuiTabBar* tab_bar,ImGuiTabItem* tab
{ {
return ImGui::TabBarGetTabName(tab_bar,tab); return ImGui::TabBarGetTabName(tab_bar,tab);
} }
CIMGUI_API void igTabBarAddTab(ImGuiTabBar* tab_bar,ImGuiTabItemFlags tab_flags,ImGuiWindow* window)
{
return ImGui::TabBarAddTab(tab_bar,tab_flags,window);
}
CIMGUI_API void igTabBarRemoveTab(ImGuiTabBar* tab_bar,ImGuiID tab_id) CIMGUI_API void igTabBarRemoveTab(ImGuiTabBar* tab_bar,ImGuiID tab_id)
{ {
return ImGui::TabBarRemoveTab(tab_bar,tab_id); return ImGui::TabBarRemoveTab(tab_bar,tab_id);
@@ -4950,6 +5303,10 @@ CIMGUI_API bool igTabItemEx(ImGuiTabBar* tab_bar,const char* label,bool* p_open,
{ {
return ImGui::TabItemEx(tab_bar,label,p_open,flags,docked_window); return ImGui::TabItemEx(tab_bar,label,p_open,flags,docked_window);
} }
CIMGUI_API void igTabItemSpacing(const char* str_id,ImGuiTabItemFlags flags,float width)
{
return ImGui::TabItemSpacing(str_id,flags,width);
}
CIMGUI_API void igTabItemCalcSize_Str(ImVec2 *pOut,const char* label,bool has_close_button_or_unsaved_marker) CIMGUI_API void igTabItemCalcSize_Str(ImVec2 *pOut,const char* label,bool has_close_button_or_unsaved_marker)
{ {
*pOut = ImGui::TabItemCalcSize(label,has_close_button_or_unsaved_marker); *pOut = ImGui::TabItemCalcSize(label,has_close_button_or_unsaved_marker);
@@ -5026,6 +5383,10 @@ CIMGUI_API void igRenderArrowPointingAt(ImDrawList* draw_list,ImVec2 pos,ImVec2
{ {
return ImGui::RenderArrowPointingAt(draw_list,pos,half_sz,direction,col); return ImGui::RenderArrowPointingAt(draw_list,pos,half_sz,direction,col);
} }
CIMGUI_API void igRenderArrowDockMenu(ImDrawList* draw_list,ImVec2 p_min,float sz,ImU32 col)
{
return ImGui::RenderArrowDockMenu(draw_list,p_min,sz,col);
}
CIMGUI_API void igRenderRectFilledRangeH(ImDrawList* draw_list,const ImRect rect,ImU32 col,float x_start_norm,float x_end_norm,float rounding) CIMGUI_API void igRenderRectFilledRangeH(ImDrawList* draw_list,const ImRect rect,ImU32 col,float x_start_norm,float x_end_norm,float rounding)
{ {
return ImGui::RenderRectFilledRangeH(draw_list,rect,col,x_start_norm,x_end_norm,rounding); return ImGui::RenderRectFilledRangeH(draw_list,rect,col,x_start_norm,x_end_norm,rounding);
@@ -5034,6 +5395,10 @@ CIMGUI_API void igRenderRectFilledWithHole(ImDrawList* draw_list,const ImRect ou
{ {
return ImGui::RenderRectFilledWithHole(draw_list,outer,inner,col,rounding); return ImGui::RenderRectFilledWithHole(draw_list,outer,inner,col,rounding);
} }
CIMGUI_API ImDrawFlags igCalcRoundingFlagsForRectInRect(const ImRect r_in,const ImRect r_outer,float threshold)
{
return ImGui::CalcRoundingFlagsForRectInRect(r_in,r_outer,threshold);
}
CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags) CIMGUI_API void igTextEx(const char* text,const char* text_end,ImGuiTextFlags flags)
{ {
return ImGui::TextEx(text,text_end,flags); return ImGui::TextEx(text,text_end,flags);
@@ -5070,9 +5435,9 @@ CIMGUI_API bool igCloseButton(ImGuiID id,const ImVec2 pos)
{ {
return ImGui::CloseButton(id,pos); return ImGui::CloseButton(id,pos);
} }
CIMGUI_API bool igCollapseButton(ImGuiID id,const ImVec2 pos) CIMGUI_API bool igCollapseButton(ImGuiID id,const ImVec2 pos,ImGuiDockNode* dock_node)
{ {
return ImGui::CollapseButton(id,pos); return ImGui::CollapseButton(id,pos,dock_node);
} }
CIMGUI_API void igScrollbar(ImGuiAxis axis) CIMGUI_API void igScrollbar(ImGuiAxis axis)
{ {
@@ -5318,6 +5683,10 @@ CIMGUI_API void igDebugNodeColumns(ImGuiOldColumns* columns)
{ {
return ImGui::DebugNodeColumns(columns); return ImGui::DebugNodeColumns(columns);
} }
CIMGUI_API void igDebugNodeDockNode(ImGuiDockNode* node,const char* label)
{
return ImGui::DebugNodeDockNode(node,label);
}
CIMGUI_API void igDebugNodeDrawList(ImGuiWindow* window,ImGuiViewportP* viewport,const ImDrawList* draw_list,const char* label) CIMGUI_API void igDebugNodeDrawList(ImGuiWindow* window,ImGuiViewportP* viewport,const ImDrawList* draw_list,const char* label)
{ {
return ImGui::DebugNodeDrawList(window,viewport,draw_list,label); return ImGui::DebugNodeDrawList(window,viewport,draw_list,label);
@@ -5382,6 +5751,10 @@ CIMGUI_API void igDebugNodeViewport(ImGuiViewportP* viewport)
{ {
return ImGui::DebugNodeViewport(viewport); return ImGui::DebugNodeViewport(viewport);
} }
CIMGUI_API void igDebugNodePlatformMonitor(ImGuiPlatformMonitor* monitor,const char* label,int idx)
{
return ImGui::DebugNodePlatformMonitor(monitor,label,idx);
}
CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list) CIMGUI_API void igDebugRenderKeyboardPreview(ImDrawList* draw_list)
{ {
return ImGui::DebugRenderKeyboardPreview(draw_list); return ImGui::DebugRenderKeyboardPreview(draw_list);
@@ -5430,6 +5803,10 @@ CIMGUI_API void igImFontAtlasBuildMultiplyRectAlpha8(const unsigned char table[2
{ {
return ImFontAtlasBuildMultiplyRectAlpha8(table,pixels,x,y,w,h,stride); return ImFontAtlasBuildMultiplyRectAlpha8(table,pixels,x,y,w,h,stride);
} }
CIMGUI_API void igImFontAtlasBuildGetOversampleFactors(const ImFontConfig* cfg,int* out_oversample_h,int* out_oversample_v)
{
return ImFontAtlasBuildGetOversampleFactors(cfg,out_oversample_h,out_oversample_v);
}
#ifdef IMGUI_ENABLE_FREETYPE #ifdef IMGUI_ENABLE_FREETYPE
CIMGUI_API const ImFontBuilderIO* ImGuiFreeType_GetBuilderForFreeType() CIMGUI_API const ImFontBuilderIO* ImGuiFreeType_GetBuilderForFreeType()
{ {
@@ -5446,7 +5823,7 @@ CIMGUI_API void ImGuiFreeType_SetAllocatorFunctions(void*(*alloc_func)(size_t sz
/////////////////////////////manual written functions /////////////////////////////manual written functions
CIMGUI_API void igLogText(CONST char *fmt, ...) CIMGUI_API void igLogText(const char *fmt, ...)
{ {
char buffer[256]; char buffer[256];
va_list args; va_list args;
@@ -5456,11 +5833,11 @@ CIMGUI_API void igLogText(CONST char *fmt, ...)
ImGui::LogText("%s", buffer); ImGui::LogText("%s", buffer);
} }
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...) CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
buffer->appendfv(fmt, args); self->appendfv(fmt, args);
va_end(args); va_end(args);
} }

500
cimgui.h

File diff suppressed because it is too large Load Diff

View File

@@ -12,7 +12,7 @@
/////////////////////////////manual written functions /////////////////////////////manual written functions
CIMGUI_API void igLogText(CONST char *fmt, ...) CIMGUI_API void igLogText(const char *fmt, ...)
{ {
char buffer[256]; char buffer[256];
va_list args; va_list args;
@@ -22,11 +22,11 @@ CIMGUI_API void igLogText(CONST char *fmt, ...)
ImGui::LogText("%s", buffer); ImGui::LogText("%s", buffer);
} }
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...) CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...)
{ {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
buffer->appendfv(fmt, args); self->appendfv(fmt, args);
va_end(args); va_end(args);
} }

View File

@@ -49,7 +49,7 @@ typedef union SDL_Event SDL_Event;
//no LogTextV //no LogTextV
CIMGUI_API void igLogText(const char *fmt, ...); CIMGUI_API void igLogText(const char *fmt, ...);
//no appendfV //no appendfV
CIMGUI_API void ImGuiTextBuffer_appendf(struct ImGuiTextBuffer *buffer, const char *fmt, ...); CIMGUI_API void ImGuiTextBuffer_appendf(ImGuiTextBuffer *self, const char *fmt, ...);
//for getting FLT_MAX in bindings //for getting FLT_MAX in bindings
CIMGUI_API float igGET_FLT_MAX(void); CIMGUI_API float igGET_FLT_MAX(void);
//for getting FLT_MIN in bindings //for getting FLT_MIN in bindings

View File

@@ -320,6 +320,9 @@ local function getRE()
function_re = "^([^;{}]+%b()[\n%s]*;)%s*", function_re = "^([^;{}]+%b()[\n%s]*;)%s*",
function_re = "^([^;{}=]+%b()[\n%s%w]*;)", --const at the end function_re = "^([^;{}=]+%b()[\n%s%w]*;)", --const at the end
function_re = "^([^;{}=]+%b()[\n%s%w%(%)_]*;)", --attribute(deprecated) function_re = "^([^;{}=]+%b()[\n%s%w%(%)_]*;)", --attribute(deprecated)
--we need to skip = as function because of "var = f()" initialization in struct fields
-- but we don want operator== to appear as a var and as we should skip this kind of function solution is:
operator_re = "^([^;{}]+operator[^;{}]+%b()[\n%s%w%(%)_]*;)",
struct_re = "^([^;{}]-struct[^;{}]-%b{}[%s%w_%(%)]*;)", struct_re = "^([^;{}]-struct[^;{}]-%b{}[%s%w_%(%)]*;)",
enum_re = "^([^;{}]-enum[^;{}]-%b{}[%s%w_%(%)]*;)", enum_re = "^([^;{}]-enum[^;{}]-%b{}[%s%w_%(%)]*;)",
union_re = "^([^;{}]-union[^;{}]-%b{}[%s%w_%(%)]*;)", union_re = "^([^;{}]-union[^;{}]-%b{}[%s%w_%(%)]*;)",
@@ -344,7 +347,7 @@ local function getRE()
} }
local resN = {"comment2_re","comment_re","emptyline_re", local resN = {"comment2_re","comment_re","emptyline_re",
"functypedef_re","functype_re","function_re","functionD_re","typedef_st_re","struct_re","enum_re","union_re","namespace_re","class_re","typedef_re","vardef_re"} "functypedef_re","functype_re","function_re","functionD_re","operator_re","typedef_st_re","struct_re","enum_re","union_re","namespace_re","class_re","typedef_re","vardef_re"}
return res,resN return res,resN
end end
@@ -600,7 +603,7 @@ local function clean_names_from_signature(self,signat)
return result return result
end end
local function clean_functypedef(line) local function clean_functypedef(line)
local first, args = line:match("(typedef .-%(%*[_%w]+%))%s*(%b())") local first, args = line:match("(typedef .-%(%*%s*[_%w]+%))%s*(%b())")
if not args then if not args then
print"not getting args in" print"not getting args in"
@@ -1042,7 +1045,39 @@ local function ADDIMSTR_S(FP)
end end
FP.funcdefs = newcdefs FP.funcdefs = newcdefs
end end
--this creates defsBystruct in case you need to list by struct container
local function DefsByStruct(FP)
local structs = {}
for fun,defs in pairs(FP.defsT) do
local stname = defs[1].stname
structs[stname] = structs[stname] or {}
table.insert(structs[stname],defs)--fun)
end
return structs
end
local function get_nonPOD(FP)
local defbystruct = DefsByStruct(FP)
--M.prtable(defbystruct)
local nonPOD = {}
for k,defs in pairs(defbystruct) do
if k~="" then
for i, ww in ipairs(defs) do
-- print(k,i,ww)
-- M.prtable(ww)
if not ww[1].ret then --constructor
nonPOD[k] = true
break;
end
end
end
end
FP.structs_and_enums_table.nonPOD = nonPOD
return nonPOD
end
local function ADDnonUDT(FP) local function ADDnonUDT(FP)
local nonPOD = get_nonPOD(FP)
--print"nonPOD"
--M.prtable(nonPOD)
local defsT = FP.defsT local defsT = FP.defsT
--local newcdefs = {} --local newcdefs = {}
for numcdef,t in ipairs(FP.funcdefs) do for numcdef,t in ipairs(FP.funcdefs) do
@@ -1056,10 +1091,17 @@ local function ADDnonUDT(FP)
end end
--if UDT return generate nonUDT version --if UDT return generate nonUDT version
local isUDT = false local isUDT = false
--isUDT = FP.structs_and_enums_table.structs[defT.ret] and true or false
isUDT = nonPOD[defT.ret] and true or false
--inherited
if (not isUDT) and FP.cimgui_inherited and FP.cimgui_inherited.nonPOD[defT.ret] then
isUDT = true
end
for _,udt_ret in ipairs(FP.UDTs) do for _,udt_ret in ipairs(FP.UDTs) do
if udt_ret == defT.ret then isUDT=true; break end if udt_ret == defT.ret then isUDT=true; break end
end end
--if defT.ret=="ImVec2" or defT.ret=="ImVec4" or defT.ret=="ImColor" then
if isUDT then if isUDT then
--passing as a pointer arg --passing as a pointer arg
local defT2 = {} local defT2 = {}
@@ -1425,6 +1467,7 @@ function M.Parser()
--save_data("./preparse"..tostring(self):gsub("table: ","")..".c",txt) --save_data("./preparse"..tostring(self):gsub("table: ","")..".c",txt)
--]] --]]
self.itemsarr = par:parseItemsR2(txt) self.itemsarr = par:parseItemsR2(txt)
--save_data("./itemsarr.lua",ToStr(self.itemsarr))
itemsarr = self.itemsarr itemsarr = self.itemsarr
end end
@@ -1471,10 +1514,13 @@ function M.Parser()
local predeclare = "" local predeclare = ""
--local iner = strip_end(stru:match("%b{}"):sub(2,-2)) --local iner = strip_end(stru:match("%b{}"):sub(2,-2))
local inistruct = clean_spaces(stru:match("(.-)%b{}")) local inistruct = clean_spaces(stru:match("(.-)%b{}"))
--clean final:
inistruct = inistruct:gsub("%s*final%s*:",":")
--local stname = stru:match("struct%s*(%S+)%s*%b{}") --local stname = stru:match("struct%s*(%S+)%s*%b{}")
local stname, derived local stname, derived
if inistruct:match":" then if inistruct:match":" then
stname,derived = inistruct:match"struct%s*([^%s:]+):(.+)" stname,derived = inistruct:match"struct%s*([^%s:]+):(.+)"
--print(inistruct,stname,derived)
derived = derived:match"(%S+)$" derived = derived:match"(%S+)$"
else else
if itst.re_name == "struct_re" then if itst.re_name == "struct_re" then
@@ -1529,12 +1575,14 @@ function M.Parser()
--local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>") --local ttype,template = it.item:match("([^%s,%(%)]+)%s*<(.+)>")
local ttype,template,te,code2 = check_template(it2) --it.item:match"([^%s,%(%)]+)%s*<(.+)>" local ttype,template,te,code2 = check_template(it2) --it.item:match"([^%s,%(%)]+)%s*<(.+)>"
if template then if template then
--print("not doheader",ttype,template,te)
if self.typenames[ttype] ~= template then --rule out T (template typename) if self.typenames[ttype] ~= template then --rule out T (template typename)
self.templates[ttype] = self.templates[ttype] or {} self.templates[ttype] = self.templates[ttype] or {}
self.templates[ttype][template] = te self.templates[ttype][template] = te
it2=code2 it2=code2
end end
if doheader then if doheader then
local templatetypedef = self:gentemplatetypedef(ttype, template,self.templates[ttype][template]) local templatetypedef = self:gentemplatetypedef(ttype, template,self.templates[ttype][template])
predeclare = predeclare .. templatetypedef predeclare = predeclare .. templatetypedef
end end
@@ -1590,7 +1638,7 @@ function M.Parser()
end end
elseif it.re_name == "enum_re" then elseif it.re_name == "enum_re" then
--nop --nop
elseif it.re_name ~= "functionD_re" and it.re_name ~= "function_re" then elseif it.re_name ~= "functionD_re" and it.re_name ~= "function_re" and it.re_name ~= "operator_re" then
print(it.re_name,"not processed clean_struct in",stname,it.item:sub(1,24)) print(it.re_name,"not processed clean_struct in",stname,it.item:sub(1,24))
--M.prtable(it) --M.prtable(it)
end end
@@ -1657,6 +1705,7 @@ function M.Parser()
it2 = clean_functypedef(it2) it2 = clean_functypedef(it2)
else else
assert(it.re_name == "vardef_re") assert(it.re_name == "vardef_re")
it2 = it2:gsub("constexpr","static const")
if it2:match"enum" then if it2:match"enum" then
print("--skip enum forward declaration:",it2) print("--skip enum forward declaration:",it2)
it2 = "" it2 = ""
@@ -1771,7 +1820,9 @@ function M.Parser()
local ttype,fun = it.item:match"^%s*template%s+<%s*typename%s+([^>]+)%s*>%s*(.+)$" local ttype,fun = it.item:match"^%s*template%s+<%s*typename%s+([^>]+)%s*>%s*(.+)$"
if self.ftemplate_list and self.ftemplate_list[ttype] then if self.ftemplate_list and self.ftemplate_list[ttype] then
for iT,vT in ipairs(self.ftemplate_list[ttype]) do for iT,vT in ipairs(self.ftemplate_list[ttype]) do
local funT = fun:gsub(ttype,vT) local funT = fun:gsub("([< %(])"..ttype,"%1"..vT)
--funT = funT:gsub("sizeof%("..ttype.."%)","sizeof("..vT..")")
--local funT = fun:gsub(ttype,vT)
self:parseFunction(stname,{item=funT},namespace,it.locat) self:parseFunction(stname,{item=funT},namespace,it.locat)
end end
end end
@@ -1779,9 +1830,11 @@ function M.Parser()
self:parseFunction(stname,it,namespace,it.locat) self:parseFunction(stname,it,namespace,it.locat)
end end
else else
if it.re_name~="operator_re" then
print("not processed gen",it.re_name,it.item:sub(1,20)) print("not processed gen",it.re_name,it.item:sub(1,20))
end end
end end
end
self:Listing(itemsarr,processer) self:Listing(itemsarr,processer)
@@ -1938,7 +1991,7 @@ function M.Parser()
self.typedefs_dict[typedefname] = strip(typedefdef) self.typedefs_dict[typedefname] = strip(typedefdef)
elseif it.re_name == "functypedef_re" then elseif it.re_name == "functypedef_re" then
-- "^\n*%s*(typedef[%w%s%*_]+%([^*]*%*?%s*[%w_]+%s*%)%s*%b()%s*;)" -- "^\n*%s*(typedef[%w%s%*_]+%([^*]*%*?%s*[%w_]+%s*%)%s*%b()%s*;)"
local key = it.item:match("%(%*([%w_]+)%)%([^%(%)]*%)") local key = it.item:match("%(%*%s*([%w_]+)%)%s*%([^%(%)]*%)")
if key then if key then
local linet = it.item local linet = it.item
linet = linet:gsub("[\n%s]+typedef ","") linet = linet:gsub("[\n%s]+typedef ","")
@@ -1989,7 +2042,7 @@ function M.Parser()
end end
elseif it.re_name == "namespace_re" or it.re_name == "union_re" or it.re_name == "functype_re" then elseif it.re_name == "namespace_re" or it.re_name == "union_re" or it.re_name == "functype_re" then
--nop --nop
elseif it.re_name ~= "functionD_re" and it.re_name ~= "function_re" then elseif it.re_name ~= "functionD_re" and it.re_name ~= "function_re" and it.re_name ~= "operator_re" then
print("not processed gen table",it.re_name) print("not processed gen table",it.re_name)
end end
end end
@@ -2234,6 +2287,7 @@ function M.Parser()
return self:gen_template_typedef_auto(ttype,te,newte) return self:gen_template_typedef_auto(ttype,te,newte)
end end
function par:gen_template_typedef_auto(ttype,te,newte) function par:gen_template_typedef_auto(ttype,te,newte)
--M.prtable(self.templated_structs)
assert(self.templated_structs[ttype],ttype) assert(self.templated_structs[ttype],ttype)
local defi = self.templated_structs[ttype] local defi = self.templated_structs[ttype]
local Targ = strsplit(self.typenames[ttype],",") local Targ = strsplit(self.typenames[ttype],",")
@@ -2277,7 +2331,111 @@ function M.Parser()
end end
return par return par
end end
-- more compact serialization
local function basicSerialize (o)
if type(o) == "number" then
return string.format("%.17g", o)
elseif type(o)=="boolean" then
return tostring(o)
elseif type(o) == "string" then
return string.format("%q", o)
elseif pcall(function() return o.__serialize end) then
return o.__serialize(o)
elseif type(o)=="cdata" then
return cdataSerialize(o)
else
return tostring(o) --"nil"
end
end
-- very readable and now suited for cyclic tables
local kw = {['and'] = true, ['break'] = true, ['do'] = true, ['else'] = true,
['elseif'] = true, ['end'] = true, ['false'] = true, ['for'] = true,
['function'] = true, ['goto'] = true, ['if'] = true, ['in'] = true,
['local'] = true, ['nil'] = true, ['not'] = true, ['or'] = true,
['repeat'] = true, ['return'] = true, ['then'] = true, ['true'] = true,
['until'] = true, ['while'] = true}
function tb2st_serialize(t,options)
options = options or {}
local function sorter(a,b)
if type(a)==type(b) then
return a<b
elseif type(a)=="number" then
return true
else
assert(type(b)=="number")
return false
end
end
local function serialize_key(val, dodot, pretty)
local dot = dodot and "." or ""
if type(val)=="string" then
if val:match '^[_%a][_%w]*$' and not kw[val] then
return dot..tostring(val)
else
return "[\""..tostring(val).."\"]"
end
elseif (not pretty) and (not dodot) and (type(val) == "number") and (math.floor(val)==val) then
return --array index
else
return "["..tostring(val).."]"
end
end
local function serialize_key_name(val)
return serialize_key(val, true)
end
local insert = table.insert
local function _tb2st(t,saved,sref,level,name)
saved = saved or {} -- initial value
level = level or 0
sref = sref or {}
name = name or "t"
if type(t)=="table" then
if saved[t] then
sref[#sref+1] = {saved[t],name}
return"nil"
else
saved[t] = name
local ordered_keys = {}
for k,v in pairs(t) do
insert(ordered_keys,k)
end
table.sort(ordered_keys,sorter)
local str2 = {}
insert(str2,"{")
if options.pretty then insert(str2,"\n") end
for _,k in ipairs(ordered_keys) do
if options.pretty then insert(str2,(" "):rep(level+1)) end
local v = t[k]
local kser = serialize_key(k, nil, options.pretty)
insert(str2, (kser and (kser .."=") or ""))
if type(v)~="table" then
insert(str2, basicSerialize(v))
else
local name2 = name .. serialize_key_name(k)
insert(str2,_tb2st(v,saved,sref,level+1,name2))
end
if options.pretty then insert(str2,",\n") else insert(str2, ",") end
end
str2[#str2] = "}"
if level == 0 then
--insert(str2, 1,"local ffi = require'ffi'\nlocal t=")
insert(str2, 1,"local t=")
for i,v in ipairs(sref) do
insert(str2, "\n"..v[2].."="..v[1])
end
insert(str2,"\n return t")
end
return table.concat(str2)
end
else
return basicSerialize(t)
end
end
return(_tb2st(t))
end
M.tb2st_serialize = tb2st_serialize
------serializeTable("anyname",table) gives a string that recreates the table with dofile(generated_string) ------serializeTable("anyname",table) gives a string that recreates the table with dofile(generated_string)
local function serializeTable(name, value, saved) local function serializeTable(name, value, saved)
@@ -2339,10 +2497,11 @@ local function serializeTable(name, value, saved)
return table.concat(string_table) return table.concat(string_table)
end end
M.serializeTable = serializeTable -- M.serializeTable = serializeTable
M.serializeTableF = function(t) -- M.serializeTableF = function(t)
return M.serializeTable("defs",t).."\nreturn defs" -- return M.serializeTable("defs",t).."\nreturn defs"
end -- end
M.serializeTableF = function(t) return tb2st_serialize(t,{pretty=true}) end --new serialization more compact
--iterates lines from a gcc/clang -E in a specific location --iterates lines from a gcc/clang -E in a specific location
local function location(file,locpathT,defines,COMPILER,keepemptylines) local function location(file,locpathT,defines,COMPILER,keepemptylines)
local define_re = "^#define%s+([^%s]+)%s+(.+)$" local define_re = "^#define%s+([^%s]+)%s+(.+)$"

View File

@@ -295,8 +295,8 @@ local function cimgui_generation(parser)
local num local num
hstrfile, num = hstrfile:gsub("typedef ImWchar16 ImWchar;", wchardefine) hstrfile, num = hstrfile:gsub("typedef ImWchar16 ImWchar;", wchardefine)
assert(num == 1) assert(num == 1)
hstrfile, num = hstrfile:gsub("Used4kPagesMap%[%(0xFFFF", "Used4kPagesMap[(IM_UNICODE_CODEPOINT_MAX") hstrfile, num = hstrfile:gsub("kPagesMap%[%(0xFFFF", "kPagesMap[(IM_UNICODE_CODEPOINT_MAX")
assert(num == 1) assert(num == 1, "kPagesMap[(IM_UNICODE_CODEPOINT_MAX not found or found more than once")
save_data("./output/cimgui.h",cimgui_header,hstrfile) save_data("./output/cimgui.h",cimgui_header,hstrfile)
--merge it in cimgui_template.cpp to cimgui.cpp --merge it in cimgui_template.cpp to cimgui.cpp
@@ -464,10 +464,11 @@ if #implementations > 0 then
extra_includes = extra_includes .. include_cmd .. inc .. " " extra_includes = extra_includes .. include_cmd .. inc .. " "
end end
end end
parser2.cimgui_inherited = dofile([[../../cimgui/generator/output/structs_and_enums.lua]])
local defines = parser2:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER) local defines = parser2:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER)
local parser3 = cpp2ffi.Parser() local parser3 = cpp2ffi.Parser()
parser3.cimgui_inherited = dofile([[../../cimgui/generator/output/structs_and_enums.lua]])
parser3:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER) parser3:take_lines(CPRE..extra_defines..extra_includes..source, {locati}, COMPILER)
parser3:do_parse() parser3:do_parse()
local cfuncsstr = func_header_impl_generate(parser3) local cfuncsstr = func_header_impl_generate(parser3)

View File

@@ -79,6 +79,7 @@ CIMGUI_API bool ImGui_ImplSDL3_InitForVulkan(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL3_InitForD3D(SDL_Window* window); CIMGUI_API bool ImGui_ImplSDL3_InitForD3D(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL3_InitForMetal(SDL_Window* window); CIMGUI_API bool ImGui_ImplSDL3_InitForMetal(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window,SDL_Renderer* renderer); CIMGUI_API bool ImGui_ImplSDL3_InitForSDLRenderer(SDL_Window* window,SDL_Renderer* renderer);
CIMGUI_API bool ImGui_ImplSDL3_InitForSDLGPU(SDL_Window* window);
CIMGUI_API bool ImGui_ImplSDL3_InitForOther(SDL_Window* window); CIMGUI_API bool ImGui_ImplSDL3_InitForOther(SDL_Window* window);
CIMGUI_API void ImGui_ImplSDL3_Shutdown(void); CIMGUI_API void ImGui_ImplSDL3_Shutdown(void);
CIMGUI_API void ImGui_ImplSDL3_NewFrame(void); CIMGUI_API void ImGui_ImplSDL3_NewFrame(void);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -17,7 +17,7 @@
"cimguiname": "ImGui_ImplGlfw_CharCallback", "cimguiname": "ImGui_ImplGlfw_CharCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_CharCallback", "funcname": "ImGui_ImplGlfw_CharCallback",
"location": "imgui_impl_glfw:57", "location": "imgui_impl_glfw:61",
"ov_cimguiname": "ImGui_ImplGlfw_CharCallback", "ov_cimguiname": "ImGui_ImplGlfw_CharCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,unsigned int)", "signature": "(GLFWwindow*,unsigned int)",
@@ -42,7 +42,7 @@
"cimguiname": "ImGui_ImplGlfw_CursorEnterCallback", "cimguiname": "ImGui_ImplGlfw_CursorEnterCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_CursorEnterCallback", "funcname": "ImGui_ImplGlfw_CursorEnterCallback",
"location": "imgui_impl_glfw:52", "location": "imgui_impl_glfw:56",
"ov_cimguiname": "ImGui_ImplGlfw_CursorEnterCallback", "ov_cimguiname": "ImGui_ImplGlfw_CursorEnterCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,int)", "signature": "(GLFWwindow*,int)",
@@ -71,7 +71,7 @@
"cimguiname": "ImGui_ImplGlfw_CursorPosCallback", "cimguiname": "ImGui_ImplGlfw_CursorPosCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_CursorPosCallback", "funcname": "ImGui_ImplGlfw_CursorPosCallback",
"location": "imgui_impl_glfw:53", "location": "imgui_impl_glfw:57",
"ov_cimguiname": "ImGui_ImplGlfw_CursorPosCallback", "ov_cimguiname": "ImGui_ImplGlfw_CursorPosCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,double,double)", "signature": "(GLFWwindow*,double,double)",
@@ -96,7 +96,7 @@
"cimguiname": "ImGui_ImplGlfw_InitForOpenGL", "cimguiname": "ImGui_ImplGlfw_InitForOpenGL",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_InitForOpenGL", "funcname": "ImGui_ImplGlfw_InitForOpenGL",
"location": "imgui_impl_glfw:28", "location": "imgui_impl_glfw:32",
"ov_cimguiname": "ImGui_ImplGlfw_InitForOpenGL", "ov_cimguiname": "ImGui_ImplGlfw_InitForOpenGL",
"ret": "bool", "ret": "bool",
"signature": "(GLFWwindow*,bool)", "signature": "(GLFWwindow*,bool)",
@@ -121,7 +121,7 @@
"cimguiname": "ImGui_ImplGlfw_InitForOther", "cimguiname": "ImGui_ImplGlfw_InitForOther",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_InitForOther", "funcname": "ImGui_ImplGlfw_InitForOther",
"location": "imgui_impl_glfw:30", "location": "imgui_impl_glfw:34",
"ov_cimguiname": "ImGui_ImplGlfw_InitForOther", "ov_cimguiname": "ImGui_ImplGlfw_InitForOther",
"ret": "bool", "ret": "bool",
"signature": "(GLFWwindow*,bool)", "signature": "(GLFWwindow*,bool)",
@@ -146,7 +146,7 @@
"cimguiname": "ImGui_ImplGlfw_InitForVulkan", "cimguiname": "ImGui_ImplGlfw_InitForVulkan",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_InitForVulkan", "funcname": "ImGui_ImplGlfw_InitForVulkan",
"location": "imgui_impl_glfw:29", "location": "imgui_impl_glfw:33",
"ov_cimguiname": "ImGui_ImplGlfw_InitForVulkan", "ov_cimguiname": "ImGui_ImplGlfw_InitForVulkan",
"ret": "bool", "ret": "bool",
"signature": "(GLFWwindow*,bool)", "signature": "(GLFWwindow*,bool)",
@@ -167,7 +167,7 @@
"cimguiname": "ImGui_ImplGlfw_InstallCallbacks", "cimguiname": "ImGui_ImplGlfw_InstallCallbacks",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_InstallCallbacks", "funcname": "ImGui_ImplGlfw_InstallCallbacks",
"location": "imgui_impl_glfw:43", "location": "imgui_impl_glfw:47",
"ov_cimguiname": "ImGui_ImplGlfw_InstallCallbacks", "ov_cimguiname": "ImGui_ImplGlfw_InstallCallbacks",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*)", "signature": "(GLFWwindow*)",
@@ -204,7 +204,7 @@
"cimguiname": "ImGui_ImplGlfw_KeyCallback", "cimguiname": "ImGui_ImplGlfw_KeyCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_KeyCallback", "funcname": "ImGui_ImplGlfw_KeyCallback",
"location": "imgui_impl_glfw:56", "location": "imgui_impl_glfw:60",
"ov_cimguiname": "ImGui_ImplGlfw_KeyCallback", "ov_cimguiname": "ImGui_ImplGlfw_KeyCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,int,int,int,int)", "signature": "(GLFWwindow*,int,int,int,int)",
@@ -229,7 +229,7 @@
"cimguiname": "ImGui_ImplGlfw_MonitorCallback", "cimguiname": "ImGui_ImplGlfw_MonitorCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_MonitorCallback", "funcname": "ImGui_ImplGlfw_MonitorCallback",
"location": "imgui_impl_glfw:58", "location": "imgui_impl_glfw:62",
"ov_cimguiname": "ImGui_ImplGlfw_MonitorCallback", "ov_cimguiname": "ImGui_ImplGlfw_MonitorCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWmonitor*,int)", "signature": "(GLFWmonitor*,int)",
@@ -262,7 +262,7 @@
"cimguiname": "ImGui_ImplGlfw_MouseButtonCallback", "cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_MouseButtonCallback", "funcname": "ImGui_ImplGlfw_MouseButtonCallback",
"location": "imgui_impl_glfw:54", "location": "imgui_impl_glfw:58",
"ov_cimguiname": "ImGui_ImplGlfw_MouseButtonCallback", "ov_cimguiname": "ImGui_ImplGlfw_MouseButtonCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,int,int,int)", "signature": "(GLFWwindow*,int,int,int)",
@@ -278,7 +278,7 @@
"cimguiname": "ImGui_ImplGlfw_NewFrame", "cimguiname": "ImGui_ImplGlfw_NewFrame",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_NewFrame", "funcname": "ImGui_ImplGlfw_NewFrame",
"location": "imgui_impl_glfw:32", "location": "imgui_impl_glfw:36",
"ov_cimguiname": "ImGui_ImplGlfw_NewFrame", "ov_cimguiname": "ImGui_ImplGlfw_NewFrame",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -299,7 +299,7 @@
"cimguiname": "ImGui_ImplGlfw_RestoreCallbacks", "cimguiname": "ImGui_ImplGlfw_RestoreCallbacks",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_RestoreCallbacks", "funcname": "ImGui_ImplGlfw_RestoreCallbacks",
"location": "imgui_impl_glfw:44", "location": "imgui_impl_glfw:48",
"ov_cimguiname": "ImGui_ImplGlfw_RestoreCallbacks", "ov_cimguiname": "ImGui_ImplGlfw_RestoreCallbacks",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*)", "signature": "(GLFWwindow*)",
@@ -328,7 +328,7 @@
"cimguiname": "ImGui_ImplGlfw_ScrollCallback", "cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_ScrollCallback", "funcname": "ImGui_ImplGlfw_ScrollCallback",
"location": "imgui_impl_glfw:55", "location": "imgui_impl_glfw:59",
"ov_cimguiname": "ImGui_ImplGlfw_ScrollCallback", "ov_cimguiname": "ImGui_ImplGlfw_ScrollCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,double,double)", "signature": "(GLFWwindow*,double,double)",
@@ -349,7 +349,7 @@
"cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", "cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", "funcname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows",
"location": "imgui_impl_glfw:48", "location": "imgui_impl_glfw:52",
"ov_cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows", "ov_cimguiname": "ImGui_ImplGlfw_SetCallbacksChainForAllWindows",
"ret": "void", "ret": "void",
"signature": "(bool)", "signature": "(bool)",
@@ -365,7 +365,7 @@
"cimguiname": "ImGui_ImplGlfw_Shutdown", "cimguiname": "ImGui_ImplGlfw_Shutdown",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_Shutdown", "funcname": "ImGui_ImplGlfw_Shutdown",
"location": "imgui_impl_glfw:31", "location": "imgui_impl_glfw:35",
"ov_cimguiname": "ImGui_ImplGlfw_Shutdown", "ov_cimguiname": "ImGui_ImplGlfw_Shutdown",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -386,7 +386,7 @@
"cimguiname": "ImGui_ImplGlfw_Sleep", "cimguiname": "ImGui_ImplGlfw_Sleep",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_Sleep", "funcname": "ImGui_ImplGlfw_Sleep",
"location": "imgui_impl_glfw:61", "location": "imgui_impl_glfw:65",
"ov_cimguiname": "ImGui_ImplGlfw_Sleep", "ov_cimguiname": "ImGui_ImplGlfw_Sleep",
"ret": "void", "ret": "void",
"signature": "(int)", "signature": "(int)",
@@ -411,7 +411,7 @@
"cimguiname": "ImGui_ImplGlfw_WindowFocusCallback", "cimguiname": "ImGui_ImplGlfw_WindowFocusCallback",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplGlfw_WindowFocusCallback", "funcname": "ImGui_ImplGlfw_WindowFocusCallback",
"location": "imgui_impl_glfw:51", "location": "imgui_impl_glfw:55",
"ov_cimguiname": "ImGui_ImplGlfw_WindowFocusCallback", "ov_cimguiname": "ImGui_ImplGlfw_WindowFocusCallback",
"ret": "void", "ret": "void",
"signature": "(GLFWwindow*,int)", "signature": "(GLFWwindow*,int)",
@@ -427,7 +427,7 @@
"cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects", "cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_CreateDeviceObjects", "funcname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"location": "imgui_impl_opengl2:38", "location": "imgui_impl_opengl2:39",
"ov_cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects", "ov_cimguiname": "ImGui_ImplOpenGL2_CreateDeviceObjects",
"ret": "bool", "ret": "bool",
"signature": "()", "signature": "()",
@@ -443,7 +443,7 @@
"cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture", "cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_CreateFontsTexture", "funcname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"location": "imgui_impl_opengl2:36", "location": "imgui_impl_opengl2:37",
"ov_cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture", "ov_cimguiname": "ImGui_ImplOpenGL2_CreateFontsTexture",
"ret": "bool", "ret": "bool",
"signature": "()", "signature": "()",
@@ -459,7 +459,7 @@
"cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects", "cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_DestroyDeviceObjects", "funcname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"location": "imgui_impl_opengl2:39", "location": "imgui_impl_opengl2:40",
"ov_cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects", "ov_cimguiname": "ImGui_ImplOpenGL2_DestroyDeviceObjects",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -475,7 +475,7 @@
"cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture", "cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_DestroyFontsTexture", "funcname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"location": "imgui_impl_opengl2:37", "location": "imgui_impl_opengl2:38",
"ov_cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture", "ov_cimguiname": "ImGui_ImplOpenGL2_DestroyFontsTexture",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -491,7 +491,7 @@
"cimguiname": "ImGui_ImplOpenGL2_Init", "cimguiname": "ImGui_ImplOpenGL2_Init",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_Init", "funcname": "ImGui_ImplOpenGL2_Init",
"location": "imgui_impl_opengl2:30", "location": "imgui_impl_opengl2:31",
"ov_cimguiname": "ImGui_ImplOpenGL2_Init", "ov_cimguiname": "ImGui_ImplOpenGL2_Init",
"ret": "bool", "ret": "bool",
"signature": "()", "signature": "()",
@@ -507,7 +507,7 @@
"cimguiname": "ImGui_ImplOpenGL2_NewFrame", "cimguiname": "ImGui_ImplOpenGL2_NewFrame",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_NewFrame", "funcname": "ImGui_ImplOpenGL2_NewFrame",
"location": "imgui_impl_opengl2:32", "location": "imgui_impl_opengl2:33",
"ov_cimguiname": "ImGui_ImplOpenGL2_NewFrame", "ov_cimguiname": "ImGui_ImplOpenGL2_NewFrame",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -528,7 +528,7 @@
"cimguiname": "ImGui_ImplOpenGL2_RenderDrawData", "cimguiname": "ImGui_ImplOpenGL2_RenderDrawData",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_RenderDrawData", "funcname": "ImGui_ImplOpenGL2_RenderDrawData",
"location": "imgui_impl_opengl2:33", "location": "imgui_impl_opengl2:34",
"ov_cimguiname": "ImGui_ImplOpenGL2_RenderDrawData", "ov_cimguiname": "ImGui_ImplOpenGL2_RenderDrawData",
"ret": "void", "ret": "void",
"signature": "(ImDrawData*)", "signature": "(ImDrawData*)",
@@ -544,7 +544,7 @@
"cimguiname": "ImGui_ImplOpenGL2_Shutdown", "cimguiname": "ImGui_ImplOpenGL2_Shutdown",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL2_Shutdown", "funcname": "ImGui_ImplOpenGL2_Shutdown",
"location": "imgui_impl_opengl2:31", "location": "imgui_impl_opengl2:32",
"ov_cimguiname": "ImGui_ImplOpenGL2_Shutdown", "ov_cimguiname": "ImGui_ImplOpenGL2_Shutdown",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -560,7 +560,7 @@
"cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects", "cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_CreateDeviceObjects", "funcname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"location": "imgui_impl_opengl3:41", "location": "imgui_impl_opengl3:42",
"ov_cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects", "ov_cimguiname": "ImGui_ImplOpenGL3_CreateDeviceObjects",
"ret": "bool", "ret": "bool",
"signature": "()", "signature": "()",
@@ -576,7 +576,7 @@
"cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture", "cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_CreateFontsTexture", "funcname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"location": "imgui_impl_opengl3:39", "location": "imgui_impl_opengl3:40",
"ov_cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture", "ov_cimguiname": "ImGui_ImplOpenGL3_CreateFontsTexture",
"ret": "bool", "ret": "bool",
"signature": "()", "signature": "()",
@@ -592,7 +592,7 @@
"cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects", "cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_DestroyDeviceObjects", "funcname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"location": "imgui_impl_opengl3:42", "location": "imgui_impl_opengl3:43",
"ov_cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects", "ov_cimguiname": "ImGui_ImplOpenGL3_DestroyDeviceObjects",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -608,7 +608,7 @@
"cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture", "cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_DestroyFontsTexture", "funcname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"location": "imgui_impl_opengl3:40", "location": "imgui_impl_opengl3:41",
"ov_cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture", "ov_cimguiname": "ImGui_ImplOpenGL3_DestroyFontsTexture",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -631,7 +631,7 @@
"glsl_version": "nullptr" "glsl_version": "nullptr"
}, },
"funcname": "ImGui_ImplOpenGL3_Init", "funcname": "ImGui_ImplOpenGL3_Init",
"location": "imgui_impl_opengl3:33", "location": "imgui_impl_opengl3:34",
"ov_cimguiname": "ImGui_ImplOpenGL3_Init", "ov_cimguiname": "ImGui_ImplOpenGL3_Init",
"ret": "bool", "ret": "bool",
"signature": "(const char*)", "signature": "(const char*)",
@@ -647,7 +647,7 @@
"cimguiname": "ImGui_ImplOpenGL3_NewFrame", "cimguiname": "ImGui_ImplOpenGL3_NewFrame",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_NewFrame", "funcname": "ImGui_ImplOpenGL3_NewFrame",
"location": "imgui_impl_opengl3:35", "location": "imgui_impl_opengl3:36",
"ov_cimguiname": "ImGui_ImplOpenGL3_NewFrame", "ov_cimguiname": "ImGui_ImplOpenGL3_NewFrame",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -668,7 +668,7 @@
"cimguiname": "ImGui_ImplOpenGL3_RenderDrawData", "cimguiname": "ImGui_ImplOpenGL3_RenderDrawData",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_RenderDrawData", "funcname": "ImGui_ImplOpenGL3_RenderDrawData",
"location": "imgui_impl_opengl3:36", "location": "imgui_impl_opengl3:37",
"ov_cimguiname": "ImGui_ImplOpenGL3_RenderDrawData", "ov_cimguiname": "ImGui_ImplOpenGL3_RenderDrawData",
"ret": "void", "ret": "void",
"signature": "(ImDrawData*)", "signature": "(ImDrawData*)",
@@ -684,7 +684,7 @@
"cimguiname": "ImGui_ImplOpenGL3_Shutdown", "cimguiname": "ImGui_ImplOpenGL3_Shutdown",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplOpenGL3_Shutdown", "funcname": "ImGui_ImplOpenGL3_Shutdown",
"location": "imgui_impl_opengl3:34", "location": "imgui_impl_opengl3:35",
"ov_cimguiname": "ImGui_ImplOpenGL3_Shutdown", "ov_cimguiname": "ImGui_ImplOpenGL3_Shutdown",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -705,7 +705,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForD3D", "cimguiname": "ImGui_ImplSDL2_InitForD3D",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForD3D", "funcname": "ImGui_ImplSDL2_InitForD3D",
"location": "imgui_impl_sdl2:33", "location": "imgui_impl_sdl2:37",
"ov_cimguiname": "ImGui_ImplSDL2_InitForD3D", "ov_cimguiname": "ImGui_ImplSDL2_InitForD3D",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -726,7 +726,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForMetal", "cimguiname": "ImGui_ImplSDL2_InitForMetal",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForMetal", "funcname": "ImGui_ImplSDL2_InitForMetal",
"location": "imgui_impl_sdl2:34", "location": "imgui_impl_sdl2:38",
"ov_cimguiname": "ImGui_ImplSDL2_InitForMetal", "ov_cimguiname": "ImGui_ImplSDL2_InitForMetal",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -751,7 +751,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForOpenGL", "cimguiname": "ImGui_ImplSDL2_InitForOpenGL",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForOpenGL", "funcname": "ImGui_ImplSDL2_InitForOpenGL",
"location": "imgui_impl_sdl2:31", "location": "imgui_impl_sdl2:35",
"ov_cimguiname": "ImGui_ImplSDL2_InitForOpenGL", "ov_cimguiname": "ImGui_ImplSDL2_InitForOpenGL",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*,void*)", "signature": "(SDL_Window*,void*)",
@@ -772,7 +772,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForOther", "cimguiname": "ImGui_ImplSDL2_InitForOther",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForOther", "funcname": "ImGui_ImplSDL2_InitForOther",
"location": "imgui_impl_sdl2:36", "location": "imgui_impl_sdl2:40",
"ov_cimguiname": "ImGui_ImplSDL2_InitForOther", "ov_cimguiname": "ImGui_ImplSDL2_InitForOther",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -797,7 +797,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer", "cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForSDLRenderer", "funcname": "ImGui_ImplSDL2_InitForSDLRenderer",
"location": "imgui_impl_sdl2:35", "location": "imgui_impl_sdl2:39",
"ov_cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer", "ov_cimguiname": "ImGui_ImplSDL2_InitForSDLRenderer",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*,SDL_Renderer*)", "signature": "(SDL_Window*,SDL_Renderer*)",
@@ -818,7 +818,7 @@
"cimguiname": "ImGui_ImplSDL2_InitForVulkan", "cimguiname": "ImGui_ImplSDL2_InitForVulkan",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_InitForVulkan", "funcname": "ImGui_ImplSDL2_InitForVulkan",
"location": "imgui_impl_sdl2:32", "location": "imgui_impl_sdl2:36",
"ov_cimguiname": "ImGui_ImplSDL2_InitForVulkan", "ov_cimguiname": "ImGui_ImplSDL2_InitForVulkan",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -834,7 +834,7 @@
"cimguiname": "ImGui_ImplSDL2_NewFrame", "cimguiname": "ImGui_ImplSDL2_NewFrame",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_NewFrame", "funcname": "ImGui_ImplSDL2_NewFrame",
"location": "imgui_impl_sdl2:38", "location": "imgui_impl_sdl2:42",
"ov_cimguiname": "ImGui_ImplSDL2_NewFrame", "ov_cimguiname": "ImGui_ImplSDL2_NewFrame",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -855,7 +855,7 @@
"cimguiname": "ImGui_ImplSDL2_ProcessEvent", "cimguiname": "ImGui_ImplSDL2_ProcessEvent",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_ProcessEvent", "funcname": "ImGui_ImplSDL2_ProcessEvent",
"location": "imgui_impl_sdl2:39", "location": "imgui_impl_sdl2:43",
"ov_cimguiname": "ImGui_ImplSDL2_ProcessEvent", "ov_cimguiname": "ImGui_ImplSDL2_ProcessEvent",
"ret": "bool", "ret": "bool",
"signature": "(const SDL_Event*)", "signature": "(const SDL_Event*)",
@@ -887,7 +887,7 @@
"manual_gamepads_count": "-1" "manual_gamepads_count": "-1"
}, },
"funcname": "ImGui_ImplSDL2_SetGamepadMode", "funcname": "ImGui_ImplSDL2_SetGamepadMode",
"location": "imgui_impl_sdl2:44", "location": "imgui_impl_sdl2:48",
"ov_cimguiname": "ImGui_ImplSDL2_SetGamepadMode", "ov_cimguiname": "ImGui_ImplSDL2_SetGamepadMode",
"ret": "void", "ret": "void",
"signature": "(ImGui_ImplSDL2_GamepadMode,struct _SDL_GameController**,int)", "signature": "(ImGui_ImplSDL2_GamepadMode,struct _SDL_GameController**,int)",
@@ -903,7 +903,7 @@
"cimguiname": "ImGui_ImplSDL2_Shutdown", "cimguiname": "ImGui_ImplSDL2_Shutdown",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL2_Shutdown", "funcname": "ImGui_ImplSDL2_Shutdown",
"location": "imgui_impl_sdl2:37", "location": "imgui_impl_sdl2:41",
"ov_cimguiname": "ImGui_ImplSDL2_Shutdown", "ov_cimguiname": "ImGui_ImplSDL2_Shutdown",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -924,7 +924,7 @@
"cimguiname": "ImGui_ImplSDL3_InitForD3D", "cimguiname": "ImGui_ImplSDL3_InitForD3D",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForD3D", "funcname": "ImGui_ImplSDL3_InitForD3D",
"location": "imgui_impl_sdl3:35", "location": "imgui_impl_sdl3:36",
"ov_cimguiname": "ImGui_ImplSDL3_InitForD3D", "ov_cimguiname": "ImGui_ImplSDL3_InitForD3D",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -945,7 +945,7 @@
"cimguiname": "ImGui_ImplSDL3_InitForMetal", "cimguiname": "ImGui_ImplSDL3_InitForMetal",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForMetal", "funcname": "ImGui_ImplSDL3_InitForMetal",
"location": "imgui_impl_sdl3:36", "location": "imgui_impl_sdl3:37",
"ov_cimguiname": "ImGui_ImplSDL3_InitForMetal", "ov_cimguiname": "ImGui_ImplSDL3_InitForMetal",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -970,7 +970,7 @@
"cimguiname": "ImGui_ImplSDL3_InitForOpenGL", "cimguiname": "ImGui_ImplSDL3_InitForOpenGL",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForOpenGL", "funcname": "ImGui_ImplSDL3_InitForOpenGL",
"location": "imgui_impl_sdl3:33", "location": "imgui_impl_sdl3:34",
"ov_cimguiname": "ImGui_ImplSDL3_InitForOpenGL", "ov_cimguiname": "ImGui_ImplSDL3_InitForOpenGL",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*,void*)", "signature": "(SDL_Window*,void*)",
@@ -991,13 +991,34 @@
"cimguiname": "ImGui_ImplSDL3_InitForOther", "cimguiname": "ImGui_ImplSDL3_InitForOther",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForOther", "funcname": "ImGui_ImplSDL3_InitForOther",
"location": "imgui_impl_sdl3:38", "location": "imgui_impl_sdl3:40",
"ov_cimguiname": "ImGui_ImplSDL3_InitForOther", "ov_cimguiname": "ImGui_ImplSDL3_InitForOther",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
"stname": "" "stname": ""
} }
], ],
"ImGui_ImplSDL3_InitForSDLGPU": [
{
"args": "(SDL_Window* window)",
"argsT": [
{
"name": "window",
"type": "SDL_Window*"
}
],
"argsoriginal": "(SDL_Window* window)",
"call_args": "(window)",
"cimguiname": "ImGui_ImplSDL3_InitForSDLGPU",
"defaults": {},
"funcname": "ImGui_ImplSDL3_InitForSDLGPU",
"location": "imgui_impl_sdl3:39",
"ov_cimguiname": "ImGui_ImplSDL3_InitForSDLGPU",
"ret": "bool",
"signature": "(SDL_Window*)",
"stname": ""
}
],
"ImGui_ImplSDL3_InitForSDLRenderer": [ "ImGui_ImplSDL3_InitForSDLRenderer": [
{ {
"args": "(SDL_Window* window,SDL_Renderer* renderer)", "args": "(SDL_Window* window,SDL_Renderer* renderer)",
@@ -1016,7 +1037,7 @@
"cimguiname": "ImGui_ImplSDL3_InitForSDLRenderer", "cimguiname": "ImGui_ImplSDL3_InitForSDLRenderer",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForSDLRenderer", "funcname": "ImGui_ImplSDL3_InitForSDLRenderer",
"location": "imgui_impl_sdl3:37", "location": "imgui_impl_sdl3:38",
"ov_cimguiname": "ImGui_ImplSDL3_InitForSDLRenderer", "ov_cimguiname": "ImGui_ImplSDL3_InitForSDLRenderer",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*,SDL_Renderer*)", "signature": "(SDL_Window*,SDL_Renderer*)",
@@ -1037,7 +1058,7 @@
"cimguiname": "ImGui_ImplSDL3_InitForVulkan", "cimguiname": "ImGui_ImplSDL3_InitForVulkan",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_InitForVulkan", "funcname": "ImGui_ImplSDL3_InitForVulkan",
"location": "imgui_impl_sdl3:34", "location": "imgui_impl_sdl3:35",
"ov_cimguiname": "ImGui_ImplSDL3_InitForVulkan", "ov_cimguiname": "ImGui_ImplSDL3_InitForVulkan",
"ret": "bool", "ret": "bool",
"signature": "(SDL_Window*)", "signature": "(SDL_Window*)",
@@ -1053,7 +1074,7 @@
"cimguiname": "ImGui_ImplSDL3_NewFrame", "cimguiname": "ImGui_ImplSDL3_NewFrame",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_NewFrame", "funcname": "ImGui_ImplSDL3_NewFrame",
"location": "imgui_impl_sdl3:40", "location": "imgui_impl_sdl3:42",
"ov_cimguiname": "ImGui_ImplSDL3_NewFrame", "ov_cimguiname": "ImGui_ImplSDL3_NewFrame",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",
@@ -1074,7 +1095,7 @@
"cimguiname": "ImGui_ImplSDL3_ProcessEvent", "cimguiname": "ImGui_ImplSDL3_ProcessEvent",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_ProcessEvent", "funcname": "ImGui_ImplSDL3_ProcessEvent",
"location": "imgui_impl_sdl3:41", "location": "imgui_impl_sdl3:43",
"ov_cimguiname": "ImGui_ImplSDL3_ProcessEvent", "ov_cimguiname": "ImGui_ImplSDL3_ProcessEvent",
"ret": "bool", "ret": "bool",
"signature": "(const SDL_Event*)", "signature": "(const SDL_Event*)",
@@ -1106,7 +1127,7 @@
"manual_gamepads_count": "-1" "manual_gamepads_count": "-1"
}, },
"funcname": "ImGui_ImplSDL3_SetGamepadMode", "funcname": "ImGui_ImplSDL3_SetGamepadMode",
"location": "imgui_impl_sdl3:46", "location": "imgui_impl_sdl3:48",
"ov_cimguiname": "ImGui_ImplSDL3_SetGamepadMode", "ov_cimguiname": "ImGui_ImplSDL3_SetGamepadMode",
"ret": "void", "ret": "void",
"signature": "(ImGui_ImplSDL3_GamepadMode,SDL_Gamepad**,int)", "signature": "(ImGui_ImplSDL3_GamepadMode,SDL_Gamepad**,int)",
@@ -1122,7 +1143,7 @@
"cimguiname": "ImGui_ImplSDL3_Shutdown", "cimguiname": "ImGui_ImplSDL3_Shutdown",
"defaults": {}, "defaults": {},
"funcname": "ImGui_ImplSDL3_Shutdown", "funcname": "ImGui_ImplSDL3_Shutdown",
"location": "imgui_impl_sdl3:39", "location": "imgui_impl_sdl3:41",
"ov_cimguiname": "ImGui_ImplSDL3_Shutdown", "ov_cimguiname": "ImGui_ImplSDL3_Shutdown",
"ret": "void", "ret": "void",
"signature": "()", "signature": "()",

File diff suppressed because it is too large Load Diff

View File

@@ -108,17 +108,13 @@ igCombo 3
1 bool igCombo_Str_arr (const char*,int*,const char* const[],int,int) 1 bool igCombo_Str_arr (const char*,int*,const char* const[],int,int)
2 bool igCombo_Str (const char*,int*,const char*,int) 2 bool igCombo_Str (const char*,int*,const char*,int)
3 bool igCombo_FnStrPtr (const char*,int*,const char*(*)(void*,int),void*,int,int) 3 bool igCombo_FnStrPtr (const char*,int*,const char*(*)(void*,int),void*,int,int)
igGetBackgroundDrawList 2
1 ImDrawList* igGetBackgroundDrawList_Nil ()
2 ImDrawList* igGetBackgroundDrawList_ViewportPtr (ImGuiViewport*)
igGetColorU32 3 igGetColorU32 3
1 ImU32 igGetColorU32_Col (ImGuiCol,float) 1 ImU32 igGetColorU32_Col (ImGuiCol,float)
2 ImU32 igGetColorU32_Vec4 (const ImVec4) 2 ImU32 igGetColorU32_Vec4 (const ImVec4)
3 ImU32 igGetColorU32_U32 (ImU32,float) 3 ImU32 igGetColorU32_U32 (ImU32,float)
igGetForegroundDrawList 3 igGetForegroundDrawList 2
1 ImDrawList* igGetForegroundDrawList_Nil () 1 ImDrawList* igGetForegroundDrawList_ViewportPtr (ImGuiViewport*)
2 ImDrawList* igGetForegroundDrawList_WindowPtr (ImGuiWindow*) 2 ImDrawList* igGetForegroundDrawList_WindowPtr (ImGuiWindow*)
3 ImDrawList* igGetForegroundDrawList_ViewportPtr (ImGuiViewport*)
igGetID 4 igGetID 4
1 ImGuiID igGetID_Str (const char*) 1 ImGuiID igGetID_Str (const char*)
2 ImGuiID igGetID_StrStr (const char*,const char*) 2 ImGuiID igGetID_StrStr (const char*,const char*)
@@ -297,4 +293,4 @@ igValue 4
2 void igValue_Int (const char*,int) 2 void igValue_Int (const char*,int)
3 void igValue_Uint (const char*,unsigned int) 3 void igValue_Uint (const char*,unsigned int)
4 void igValue_Float (const char*,float,const char*) 4 void igValue_Float (const char*,float,const char*)
208 overloaded 205 overloaded

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -40,13 +40,20 @@
"ImGuiContext": "struct ImGuiContext", "ImGuiContext": "struct ImGuiContext",
"ImGuiContextHook": "struct ImGuiContextHook", "ImGuiContextHook": "struct ImGuiContextHook",
"ImGuiContextHookCallback": "void (*)(ImGuiContext* ctx, ImGuiContextHook* hook);", "ImGuiContextHookCallback": "void (*)(ImGuiContext* ctx, ImGuiContextHook* hook);",
"ImGuiDataAuthority": "int",
"ImGuiDataType": "int", "ImGuiDataType": "int",
"ImGuiDataTypeInfo": "struct ImGuiDataTypeInfo", "ImGuiDataTypeInfo": "struct ImGuiDataTypeInfo",
"ImGuiDataTypeStorage": "struct ImGuiDataTypeStorage", "ImGuiDataTypeStorage": "struct ImGuiDataTypeStorage",
"ImGuiDataVarInfo": "struct ImGuiDataVarInfo", "ImGuiDataVarInfo": "struct ImGuiDataVarInfo",
"ImGuiDeactivatedItemData": "struct ImGuiDeactivatedItemData",
"ImGuiDebugAllocEntry": "struct ImGuiDebugAllocEntry", "ImGuiDebugAllocEntry": "struct ImGuiDebugAllocEntry",
"ImGuiDebugAllocInfo": "struct ImGuiDebugAllocInfo", "ImGuiDebugAllocInfo": "struct ImGuiDebugAllocInfo",
"ImGuiDebugLogFlags": "int", "ImGuiDebugLogFlags": "int",
"ImGuiDockContext": "struct ImGuiDockContext",
"ImGuiDockNode": "struct ImGuiDockNode",
"ImGuiDockNodeFlags": "int",
"ImGuiDockNodeSettings": "struct ImGuiDockNodeSettings",
"ImGuiDockRequest": "struct ImGuiDockRequest",
"ImGuiDragDropFlags": "int", "ImGuiDragDropFlags": "int",
"ImGuiErrorCallback": "void (*)(ImGuiContext* ctx, void* user_data, const char* msg);", "ImGuiErrorCallback": "void (*)(ImGuiContext* ctx, void* user_data, const char* msg);",
"ImGuiErrorRecoveryState": "struct ImGuiErrorRecoveryState", "ImGuiErrorRecoveryState": "struct ImGuiErrorRecoveryState",
@@ -63,6 +70,7 @@
"ImGuiInputEventKey": "struct ImGuiInputEventKey", "ImGuiInputEventKey": "struct ImGuiInputEventKey",
"ImGuiInputEventMouseButton": "struct ImGuiInputEventMouseButton", "ImGuiInputEventMouseButton": "struct ImGuiInputEventMouseButton",
"ImGuiInputEventMousePos": "struct ImGuiInputEventMousePos", "ImGuiInputEventMousePos": "struct ImGuiInputEventMousePos",
"ImGuiInputEventMouseViewport": "struct ImGuiInputEventMouseViewport",
"ImGuiInputEventMouseWheel": "struct ImGuiInputEventMouseWheel", "ImGuiInputEventMouseWheel": "struct ImGuiInputEventMouseWheel",
"ImGuiInputEventText": "struct ImGuiInputEventText", "ImGuiInputEventText": "struct ImGuiInputEventText",
"ImGuiInputFlags": "int", "ImGuiInputFlags": "int",
@@ -111,6 +119,7 @@
"ImGuiPayload": "struct ImGuiPayload", "ImGuiPayload": "struct ImGuiPayload",
"ImGuiPlatformIO": "struct ImGuiPlatformIO", "ImGuiPlatformIO": "struct ImGuiPlatformIO",
"ImGuiPlatformImeData": "struct ImGuiPlatformImeData", "ImGuiPlatformImeData": "struct ImGuiPlatformImeData",
"ImGuiPlatformMonitor": "struct ImGuiPlatformMonitor",
"ImGuiPopupData": "struct ImGuiPopupData", "ImGuiPopupData": "struct ImGuiPopupData",
"ImGuiPopupFlags": "int", "ImGuiPopupFlags": "int",
"ImGuiPtrOrIndex": "struct ImGuiPtrOrIndex", "ImGuiPtrOrIndex": "struct ImGuiPtrOrIndex",
@@ -168,6 +177,8 @@
"ImGuiViewportFlags": "int", "ImGuiViewportFlags": "int",
"ImGuiViewportP": "struct ImGuiViewportP", "ImGuiViewportP": "struct ImGuiViewportP",
"ImGuiWindow": "struct ImGuiWindow", "ImGuiWindow": "struct ImGuiWindow",
"ImGuiWindowClass": "struct ImGuiWindowClass",
"ImGuiWindowDockStyle": "struct ImGuiWindowDockStyle",
"ImGuiWindowFlags": "int", "ImGuiWindowFlags": "int",
"ImGuiWindowRefreshFlags": "int", "ImGuiWindowRefreshFlags": "int",
"ImGuiWindowSettings": "struct ImGuiWindowSettings", "ImGuiWindowSettings": "struct ImGuiWindowSettings",

View File

@@ -1,197 +1,207 @@
local defs = {} local t={
defs["ImBitArrayForNamedKeys"] = "ImBitArray<ImGuiKey_NamedKey_COUNT, -ImGuiKey_NamedKey_BEGIN>" ImBitArrayForNamedKeys="ImBitArray<ImGuiKey_NamedKey_COUNT, -ImGuiKey_NamedKey_BEGIN>",
defs["ImBitArrayPtr"] = "ImU32*" ImBitArrayPtr="ImU32*",
defs["ImBitVector"] = "struct ImBitVector" ImBitVector="struct ImBitVector",
defs["ImColor"] = "struct ImColor" ImColor="struct ImColor",
defs["ImDrawCallback"] = "void (*)(const ImDrawList* parent_list, const ImDrawCmd* cmd);" ImDrawCallback="void (*)(const ImDrawList* parent_list, const ImDrawCmd* cmd);",
defs["ImDrawChannel"] = "struct ImDrawChannel" ImDrawChannel="struct ImDrawChannel",
defs["ImDrawCmd"] = "struct ImDrawCmd" ImDrawCmd="struct ImDrawCmd",
defs["ImDrawCmdHeader"] = "struct ImDrawCmdHeader" ImDrawCmdHeader="struct ImDrawCmdHeader",
defs["ImDrawData"] = "struct ImDrawData" ImDrawData="struct ImDrawData",
defs["ImDrawDataBuilder"] = "struct ImDrawDataBuilder" ImDrawDataBuilder="struct ImDrawDataBuilder",
defs["ImDrawFlags"] = "int" ImDrawFlags="int",
defs["ImDrawIdx"] = "unsigned short" ImDrawIdx="unsigned short",
defs["ImDrawList"] = "struct ImDrawList" ImDrawList="struct ImDrawList",
defs["ImDrawListFlags"] = "int" ImDrawListFlags="int",
defs["ImDrawListSharedData"] = "struct ImDrawListSharedData" ImDrawListSharedData="struct ImDrawListSharedData",
defs["ImDrawListSplitter"] = "struct ImDrawListSplitter" ImDrawListSplitter="struct ImDrawListSplitter",
defs["ImDrawVert"] = "struct ImDrawVert" ImDrawVert="struct ImDrawVert",
defs["ImFileHandle"] = "FILE*" ImFileHandle="FILE*",
defs["ImFont"] = "struct ImFont" ImFont="struct ImFont",
defs["ImFontAtlas"] = "struct ImFontAtlas" ImFontAtlas="struct ImFontAtlas",
defs["ImFontAtlasCustomRect"] = "struct ImFontAtlasCustomRect" ImFontAtlasCustomRect="struct ImFontAtlasCustomRect",
defs["ImFontAtlasFlags"] = "int" ImFontAtlasFlags="int",
defs["ImFontBuilderIO"] = "struct ImFontBuilderIO" ImFontBuilderIO="struct ImFontBuilderIO",
defs["ImFontConfig"] = "struct ImFontConfig" ImFontConfig="struct ImFontConfig",
defs["ImFontGlyph"] = "struct ImFontGlyph" ImFontGlyph="struct ImFontGlyph",
defs["ImFontGlyphRangesBuilder"] = "struct ImFontGlyphRangesBuilder" ImFontGlyphRangesBuilder="struct ImFontGlyphRangesBuilder",
defs["ImGuiActivateFlags"] = "int" ImGuiActivateFlags="int",
defs["ImGuiBackendFlags"] = "int" ImGuiBackendFlags="int",
defs["ImGuiBoxSelectState"] = "struct ImGuiBoxSelectState" ImGuiBoxSelectState="struct ImGuiBoxSelectState",
defs["ImGuiButtonFlags"] = "int" ImGuiButtonFlags="int",
defs["ImGuiChildFlags"] = "int" ImGuiChildFlags="int",
defs["ImGuiCol"] = "int" ImGuiCol="int",
defs["ImGuiColorEditFlags"] = "int" ImGuiColorEditFlags="int",
defs["ImGuiColorMod"] = "struct ImGuiColorMod" ImGuiColorMod="struct ImGuiColorMod",
defs["ImGuiComboFlags"] = "int" ImGuiComboFlags="int",
defs["ImGuiComboPreviewData"] = "struct ImGuiComboPreviewData" ImGuiComboPreviewData="struct ImGuiComboPreviewData",
defs["ImGuiCond"] = "int" ImGuiCond="int",
defs["ImGuiConfigFlags"] = "int" ImGuiConfigFlags="int",
defs["ImGuiContext"] = "struct ImGuiContext" ImGuiContext="struct ImGuiContext",
defs["ImGuiContextHook"] = "struct ImGuiContextHook" ImGuiContextHook="struct ImGuiContextHook",
defs["ImGuiContextHookCallback"] = "void (*)(ImGuiContext* ctx, ImGuiContextHook* hook);" ImGuiContextHookCallback="void (*)(ImGuiContext* ctx, ImGuiContextHook* hook);",
defs["ImGuiDataType"] = "int" ImGuiDataAuthority="int",
defs["ImGuiDataTypeInfo"] = "struct ImGuiDataTypeInfo" ImGuiDataType="int",
defs["ImGuiDataTypeStorage"] = "struct ImGuiDataTypeStorage" ImGuiDataTypeInfo="struct ImGuiDataTypeInfo",
defs["ImGuiDataVarInfo"] = "struct ImGuiDataVarInfo" ImGuiDataTypeStorage="struct ImGuiDataTypeStorage",
defs["ImGuiDebugAllocEntry"] = "struct ImGuiDebugAllocEntry" ImGuiDataVarInfo="struct ImGuiDataVarInfo",
defs["ImGuiDebugAllocInfo"] = "struct ImGuiDebugAllocInfo" ImGuiDeactivatedItemData="struct ImGuiDeactivatedItemData",
defs["ImGuiDebugLogFlags"] = "int" ImGuiDebugAllocEntry="struct ImGuiDebugAllocEntry",
defs["ImGuiDragDropFlags"] = "int" ImGuiDebugAllocInfo="struct ImGuiDebugAllocInfo",
defs["ImGuiErrorCallback"] = "void (*)(ImGuiContext* ctx, void* user_data, const char* msg);" ImGuiDebugLogFlags="int",
defs["ImGuiErrorRecoveryState"] = "struct ImGuiErrorRecoveryState" ImGuiDockContext="struct ImGuiDockContext",
defs["ImGuiFocusRequestFlags"] = "int" ImGuiDockNode="struct ImGuiDockNode",
defs["ImGuiFocusScopeData"] = "struct ImGuiFocusScopeData" ImGuiDockNodeFlags="int",
defs["ImGuiFocusedFlags"] = "int" ImGuiDockNodeSettings="struct ImGuiDockNodeSettings",
defs["ImGuiGroupData"] = "struct ImGuiGroupData" ImGuiDockRequest="struct ImGuiDockRequest",
defs["ImGuiHoveredFlags"] = "int" ImGuiDragDropFlags="int",
defs["ImGuiID"] = "unsigned int" ImGuiErrorCallback="void (*)(ImGuiContext* ctx, void* user_data, const char* msg);",
defs["ImGuiIDStackTool"] = "struct ImGuiIDStackTool" ImGuiErrorRecoveryState="struct ImGuiErrorRecoveryState",
defs["ImGuiIO"] = "struct ImGuiIO" ImGuiFocusRequestFlags="int",
defs["ImGuiInputEvent"] = "struct ImGuiInputEvent" ImGuiFocusScopeData="struct ImGuiFocusScopeData",
defs["ImGuiInputEventAppFocused"] = "struct ImGuiInputEventAppFocused" ImGuiFocusedFlags="int",
defs["ImGuiInputEventKey"] = "struct ImGuiInputEventKey" ImGuiGroupData="struct ImGuiGroupData",
defs["ImGuiInputEventMouseButton"] = "struct ImGuiInputEventMouseButton" ImGuiHoveredFlags="int",
defs["ImGuiInputEventMousePos"] = "struct ImGuiInputEventMousePos" ImGuiID="unsigned int",
defs["ImGuiInputEventMouseWheel"] = "struct ImGuiInputEventMouseWheel" ImGuiIDStackTool="struct ImGuiIDStackTool",
defs["ImGuiInputEventText"] = "struct ImGuiInputEventText" ImGuiIO="struct ImGuiIO",
defs["ImGuiInputFlags"] = "int" ImGuiInputEvent="struct ImGuiInputEvent",
defs["ImGuiInputTextCallback"] = "int (*)(ImGuiInputTextCallbackData* data);" ImGuiInputEventAppFocused="struct ImGuiInputEventAppFocused",
defs["ImGuiInputTextCallbackData"] = "struct ImGuiInputTextCallbackData" ImGuiInputEventKey="struct ImGuiInputEventKey",
defs["ImGuiInputTextDeactivateData"] = "struct ImGuiInputTextDeactivateData" ImGuiInputEventMouseButton="struct ImGuiInputEventMouseButton",
defs["ImGuiInputTextDeactivatedState"] = "struct ImGuiInputTextDeactivatedState" ImGuiInputEventMousePos="struct ImGuiInputEventMousePos",
defs["ImGuiInputTextFlags"] = "int" ImGuiInputEventMouseViewport="struct ImGuiInputEventMouseViewport",
defs["ImGuiInputTextState"] = "struct ImGuiInputTextState" ImGuiInputEventMouseWheel="struct ImGuiInputEventMouseWheel",
defs["ImGuiItemFlags"] = "int" ImGuiInputEventText="struct ImGuiInputEventText",
defs["ImGuiItemStatusFlags"] = "int" ImGuiInputFlags="int",
defs["ImGuiKeyChord"] = "int" ImGuiInputTextCallback="int (*)(ImGuiInputTextCallbackData* data);",
defs["ImGuiKeyData"] = "struct ImGuiKeyData" ImGuiInputTextCallbackData="struct ImGuiInputTextCallbackData",
defs["ImGuiKeyOwnerData"] = "struct ImGuiKeyOwnerData" ImGuiInputTextDeactivateData="struct ImGuiInputTextDeactivateData",
defs["ImGuiKeyRoutingData"] = "struct ImGuiKeyRoutingData" ImGuiInputTextDeactivatedState="struct ImGuiInputTextDeactivatedState",
defs["ImGuiKeyRoutingIndex"] = "ImS16" ImGuiInputTextFlags="int",
defs["ImGuiKeyRoutingTable"] = "struct ImGuiKeyRoutingTable" ImGuiInputTextState="struct ImGuiInputTextState",
defs["ImGuiLastItemData"] = "struct ImGuiLastItemData" ImGuiItemFlags="int",
defs["ImGuiLayoutType"] = "int" ImGuiItemStatusFlags="int",
defs["ImGuiListClipper"] = "struct ImGuiListClipper" ImGuiKeyChord="int",
defs["ImGuiListClipperData"] = "struct ImGuiListClipperData" ImGuiKeyData="struct ImGuiKeyData",
defs["ImGuiListClipperRange"] = "struct ImGuiListClipperRange" ImGuiKeyOwnerData="struct ImGuiKeyOwnerData",
defs["ImGuiLocEntry"] = "struct ImGuiLocEntry" ImGuiKeyRoutingData="struct ImGuiKeyRoutingData",
defs["ImGuiLogFlags"] = "int" ImGuiKeyRoutingIndex="ImS16",
defs["ImGuiMemAllocFunc"] = "void* (*)(size_t sz, void* user_data);" ImGuiKeyRoutingTable="struct ImGuiKeyRoutingTable",
defs["ImGuiMemFreeFunc"] = "void (*)(void* ptr, void* user_data);" ImGuiLastItemData="struct ImGuiLastItemData",
defs["ImGuiMenuColumns"] = "struct ImGuiMenuColumns" ImGuiLayoutType="int",
defs["ImGuiMetricsConfig"] = "struct ImGuiMetricsConfig" ImGuiListClipper="struct ImGuiListClipper",
defs["ImGuiMouseButton"] = "int" ImGuiListClipperData="struct ImGuiListClipperData",
defs["ImGuiMouseCursor"] = "int" ImGuiListClipperRange="struct ImGuiListClipperRange",
defs["ImGuiMultiSelectFlags"] = "int" ImGuiLocEntry="struct ImGuiLocEntry",
defs["ImGuiMultiSelectIO"] = "struct ImGuiMultiSelectIO" ImGuiLogFlags="int",
defs["ImGuiMultiSelectState"] = "struct ImGuiMultiSelectState" ImGuiMemAllocFunc="void* (*)(size_t sz, void* user_data);",
defs["ImGuiMultiSelectTempData"] = "struct ImGuiMultiSelectTempData" ImGuiMemFreeFunc="void (*)(void* ptr, void* user_data);",
defs["ImGuiNavItemData"] = "struct ImGuiNavItemData" ImGuiMenuColumns="struct ImGuiMenuColumns",
defs["ImGuiNavMoveFlags"] = "int" ImGuiMetricsConfig="struct ImGuiMetricsConfig",
defs["ImGuiNavRenderCursorFlags"] = "int" ImGuiMouseButton="int",
defs["ImGuiNextItemData"] = "struct ImGuiNextItemData" ImGuiMouseCursor="int",
defs["ImGuiNextItemDataFlags"] = "int" ImGuiMultiSelectFlags="int",
defs["ImGuiNextWindowData"] = "struct ImGuiNextWindowData" ImGuiMultiSelectIO="struct ImGuiMultiSelectIO",
defs["ImGuiNextWindowDataFlags"] = "int" ImGuiMultiSelectState="struct ImGuiMultiSelectState",
defs["ImGuiOldColumnData"] = "struct ImGuiOldColumnData" ImGuiMultiSelectTempData="struct ImGuiMultiSelectTempData",
defs["ImGuiOldColumnFlags"] = "int" ImGuiNavItemData="struct ImGuiNavItemData",
defs["ImGuiOldColumns"] = "struct ImGuiOldColumns" ImGuiNavMoveFlags="int",
defs["ImGuiOnceUponAFrame"] = "struct ImGuiOnceUponAFrame" ImGuiNavRenderCursorFlags="int",
defs["ImGuiPayload"] = "struct ImGuiPayload" ImGuiNextItemData="struct ImGuiNextItemData",
defs["ImGuiPlatformIO"] = "struct ImGuiPlatformIO" ImGuiNextItemDataFlags="int",
defs["ImGuiPlatformImeData"] = "struct ImGuiPlatformImeData" ImGuiNextWindowData="struct ImGuiNextWindowData",
defs["ImGuiPopupData"] = "struct ImGuiPopupData" ImGuiNextWindowDataFlags="int",
defs["ImGuiPopupFlags"] = "int" ImGuiOldColumnData="struct ImGuiOldColumnData",
defs["ImGuiPtrOrIndex"] = "struct ImGuiPtrOrIndex" ImGuiOldColumnFlags="int",
defs["ImGuiScrollFlags"] = "int" ImGuiOldColumns="struct ImGuiOldColumns",
defs["ImGuiSelectableFlags"] = "int" ImGuiOnceUponAFrame="struct ImGuiOnceUponAFrame",
defs["ImGuiSelectionBasicStorage"] = "struct ImGuiSelectionBasicStorage" ImGuiPayload="struct ImGuiPayload",
defs["ImGuiSelectionExternalStorage"] = "struct ImGuiSelectionExternalStorage" ImGuiPlatformIO="struct ImGuiPlatformIO",
defs["ImGuiSelectionRequest"] = "struct ImGuiSelectionRequest" ImGuiPlatformImeData="struct ImGuiPlatformImeData",
defs["ImGuiSelectionUserData"] = "ImS64" ImGuiPlatformMonitor="struct ImGuiPlatformMonitor",
defs["ImGuiSeparatorFlags"] = "int" ImGuiPopupData="struct ImGuiPopupData",
defs["ImGuiSettingsHandler"] = "struct ImGuiSettingsHandler" ImGuiPopupFlags="int",
defs["ImGuiShrinkWidthItem"] = "struct ImGuiShrinkWidthItem" ImGuiPtrOrIndex="struct ImGuiPtrOrIndex",
defs["ImGuiSizeCallback"] = "void (*)(ImGuiSizeCallbackData* data);" ImGuiScrollFlags="int",
defs["ImGuiSizeCallbackData"] = "struct ImGuiSizeCallbackData" ImGuiSelectableFlags="int",
defs["ImGuiSliderFlags"] = "int" ImGuiSelectionBasicStorage="struct ImGuiSelectionBasicStorage",
defs["ImGuiStackLevelInfo"] = "struct ImGuiStackLevelInfo" ImGuiSelectionExternalStorage="struct ImGuiSelectionExternalStorage",
defs["ImGuiStorage"] = "struct ImGuiStorage" ImGuiSelectionRequest="struct ImGuiSelectionRequest",
defs["ImGuiStoragePair"] = "struct ImGuiStoragePair" ImGuiSelectionUserData="ImS64",
defs["ImGuiStyle"] = "struct ImGuiStyle" ImGuiSeparatorFlags="int",
defs["ImGuiStyleMod"] = "struct ImGuiStyleMod" ImGuiSettingsHandler="struct ImGuiSettingsHandler",
defs["ImGuiStyleVar"] = "int" ImGuiShrinkWidthItem="struct ImGuiShrinkWidthItem",
defs["ImGuiTabBar"] = "struct ImGuiTabBar" ImGuiSizeCallback="void (*)(ImGuiSizeCallbackData* data);",
defs["ImGuiTabBarFlags"] = "int" ImGuiSizeCallbackData="struct ImGuiSizeCallbackData",
defs["ImGuiTabItem"] = "struct ImGuiTabItem" ImGuiSliderFlags="int",
defs["ImGuiTabItemFlags"] = "int" ImGuiStackLevelInfo="struct ImGuiStackLevelInfo",
defs["ImGuiTable"] = "struct ImGuiTable" ImGuiStorage="struct ImGuiStorage",
defs["ImGuiTableBgTarget"] = "int" ImGuiStoragePair="struct ImGuiStoragePair",
defs["ImGuiTableCellData"] = "struct ImGuiTableCellData" ImGuiStyle="struct ImGuiStyle",
defs["ImGuiTableColumn"] = "struct ImGuiTableColumn" ImGuiStyleMod="struct ImGuiStyleMod",
defs["ImGuiTableColumnFlags"] = "int" ImGuiStyleVar="int",
defs["ImGuiTableColumnIdx"] = "ImS16" ImGuiTabBar="struct ImGuiTabBar",
defs["ImGuiTableColumnSettings"] = "struct ImGuiTableColumnSettings" ImGuiTabBarFlags="int",
defs["ImGuiTableColumnSortSpecs"] = "struct ImGuiTableColumnSortSpecs" ImGuiTabItem="struct ImGuiTabItem",
defs["ImGuiTableColumnsSettings"] = "struct ImGuiTableColumnsSettings" ImGuiTabItemFlags="int",
defs["ImGuiTableDrawChannelIdx"] = "ImU16" ImGuiTable="struct ImGuiTable",
defs["ImGuiTableFlags"] = "int" ImGuiTableBgTarget="int",
defs["ImGuiTableHeaderData"] = "struct ImGuiTableHeaderData" ImGuiTableCellData="struct ImGuiTableCellData",
defs["ImGuiTableInstanceData"] = "struct ImGuiTableInstanceData" ImGuiTableColumn="struct ImGuiTableColumn",
defs["ImGuiTableRowFlags"] = "int" ImGuiTableColumnFlags="int",
defs["ImGuiTableSettings"] = "struct ImGuiTableSettings" ImGuiTableColumnIdx="ImS16",
defs["ImGuiTableSortSpecs"] = "struct ImGuiTableSortSpecs" ImGuiTableColumnSettings="struct ImGuiTableColumnSettings",
defs["ImGuiTableTempData"] = "struct ImGuiTableTempData" ImGuiTableColumnSortSpecs="struct ImGuiTableColumnSortSpecs",
defs["ImGuiTextBuffer"] = "struct ImGuiTextBuffer" ImGuiTableColumnsSettings="struct ImGuiTableColumnsSettings",
defs["ImGuiTextFilter"] = "struct ImGuiTextFilter" ImGuiTableDrawChannelIdx="ImU16",
defs["ImGuiTextFlags"] = "int" ImGuiTableFlags="int",
defs["ImGuiTextIndex"] = "struct ImGuiTextIndex" ImGuiTableHeaderData="struct ImGuiTableHeaderData",
defs["ImGuiTextRange"] = "struct ImGuiTextRange" ImGuiTableInstanceData="struct ImGuiTableInstanceData",
defs["ImGuiTooltipFlags"] = "int" ImGuiTableRowFlags="int",
defs["ImGuiTreeNodeFlags"] = "int" ImGuiTableSettings="struct ImGuiTableSettings",
defs["ImGuiTreeNodeStackData"] = "struct ImGuiTreeNodeStackData" ImGuiTableSortSpecs="struct ImGuiTableSortSpecs",
defs["ImGuiTypingSelectFlags"] = "int" ImGuiTableTempData="struct ImGuiTableTempData",
defs["ImGuiTypingSelectRequest"] = "struct ImGuiTypingSelectRequest" ImGuiTextBuffer="struct ImGuiTextBuffer",
defs["ImGuiTypingSelectState"] = "struct ImGuiTypingSelectState" ImGuiTextFilter="struct ImGuiTextFilter",
defs["ImGuiViewport"] = "struct ImGuiViewport" ImGuiTextFlags="int",
defs["ImGuiViewportFlags"] = "int" ImGuiTextIndex="struct ImGuiTextIndex",
defs["ImGuiViewportP"] = "struct ImGuiViewportP" ImGuiTextRange="struct ImGuiTextRange",
defs["ImGuiWindow"] = "struct ImGuiWindow" ImGuiTooltipFlags="int",
defs["ImGuiWindowFlags"] = "int" ImGuiTreeNodeFlags="int",
defs["ImGuiWindowRefreshFlags"] = "int" ImGuiTreeNodeStackData="struct ImGuiTreeNodeStackData",
defs["ImGuiWindowSettings"] = "struct ImGuiWindowSettings" ImGuiTypingSelectFlags="int",
defs["ImGuiWindowStackData"] = "struct ImGuiWindowStackData" ImGuiTypingSelectRequest="struct ImGuiTypingSelectRequest",
defs["ImGuiWindowTempData"] = "struct ImGuiWindowTempData" ImGuiTypingSelectState="struct ImGuiTypingSelectState",
defs["ImPoolIdx"] = "int" ImGuiViewport="struct ImGuiViewport",
defs["ImRect"] = "struct ImRect" ImGuiViewportFlags="int",
defs["ImS16"] = "signed short" ImGuiViewportP="struct ImGuiViewportP",
defs["ImS32"] = "signed int" ImGuiWindow="struct ImGuiWindow",
defs["ImS64"] = "signed long long" ImGuiWindowClass="struct ImGuiWindowClass",
defs["ImS8"] = "signed char" ImGuiWindowDockStyle="struct ImGuiWindowDockStyle",
defs["ImStbTexteditState"] = "ImStb::STB_TexteditState" ImGuiWindowFlags="int",
defs["ImTextureID"] = "ImU64" ImGuiWindowRefreshFlags="int",
defs["ImU16"] = "unsigned short" ImGuiWindowSettings="struct ImGuiWindowSettings",
defs["ImU32"] = "unsigned int" ImGuiWindowStackData="struct ImGuiWindowStackData",
defs["ImU64"] = "unsigned long long" ImGuiWindowTempData="struct ImGuiWindowTempData",
defs["ImU8"] = "unsigned char" ImPoolIdx="int",
defs["ImVec1"] = "struct ImVec1" ImRect="struct ImRect",
defs["ImVec2"] = "struct ImVec2" ImS16="signed short",
defs["ImVec2ih"] = "struct ImVec2ih" ImS32="signed int",
defs["ImVec4"] = "struct ImVec4" ImS64="signed long long",
defs["ImWchar"] = "ImWchar16" ImS8="signed char",
defs["ImWchar16"] = "unsigned short" ImStbTexteditState="ImStb::STB_TexteditState",
defs["ImWchar32"] = "unsigned int" ImTextureID="ImU64",
defs["STB_TexteditState"] = "struct STB_TexteditState" ImU16="unsigned short",
ImU32="unsigned int",
return defs ImU64="unsigned long long",
ImU8="unsigned char",
ImVec1="struct ImVec1",
ImVec2="struct ImVec2",
ImVec2ih="struct ImVec2ih",
ImVec4="struct ImVec4",
ImWchar="ImWchar16",
ImWchar16="unsigned short",
ImWchar32="unsigned int",
STB_TexteditState="struct STB_TexteditState"}
return t

2
imgui

Submodule imgui updated: 993fa34749...11b3a7c8ca