From 6479bef5e0574f8f4c03977a7d65eabe68d2e25f Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Wed, 31 Dec 2025 14:27:34 +0100 Subject: [PATCH] Reshade dependency update --- external/reshade/include/reshade.hpp | 55 +++++++------- external/reshade/include/reshade_api.hpp | 68 ++++++++++++----- .../reshade/include/reshade_api_device.hpp | 60 ++++++++++++--- .../reshade/include/reshade_api_format.hpp | 18 ++++- .../reshade/include/reshade_api_pipeline.hpp | 23 +++--- .../reshade/include/reshade_api_resource.hpp | 5 ++ external/reshade/include/reshade_events.hpp | 64 ++++++++++++++-- external/reshade/include/reshade_overlay.hpp | 74 ++++++++----------- 8 files changed, 248 insertions(+), 119 deletions(-) diff --git a/external/reshade/include/reshade.hpp b/external/reshade/include/reshade.hpp index 878c8e0..3844dc3 100644 --- a/external/reshade/include/reshade.hpp +++ b/external/reshade/include/reshade.hpp @@ -8,10 +8,9 @@ #include "reshade_events.hpp" #include "reshade_overlay.hpp" #include -#include // Current version of the ReShade API -#define RESHADE_API_VERSION 17 +#define RESHADE_API_VERSION 18 // Optionally import ReShade API functions when 'RESHADE_API_LIBRARY' is defined instead of using header-only mode #if defined(RESHADE_API_LIBRARY) || defined(RESHADE_API_LIBRARY_EXPORT) @@ -23,26 +22,26 @@ #define RESHADE_API_LIBRARY_DECL extern "C" __declspec(dllimport) #endif -RESHADE_API_LIBRARY_DECL void ReShadeLogMessage(HMODULE module, int level, const char *message); +RESHADE_API_LIBRARY_DECL void ReShadeLogMessage(void *module, int level, const char *message); RESHADE_API_LIBRARY_DECL void ReShadeGetBasePath(char *path, size_t *path_size); -RESHADE_API_LIBRARY_DECL bool ReShadeGetConfigValue(HMODULE module, reshade::api::effect_runtime *runtime, const char *section, const char *key, char *value, size_t *value_size); -RESHADE_API_LIBRARY_DECL void ReShadeSetConfigValue(HMODULE module, reshade::api::effect_runtime *runtime, const char *section, const char *key, const char *value); -RESHADE_API_LIBRARY_DECL void ReShadeSetConfigArray(HMODULE module, reshade::api::effect_runtime *runtime, const char *section, const char *key, const char *value, size_t value_size); +RESHADE_API_LIBRARY_DECL bool ReShadeGetConfigValue(void *module, reshade::api::effect_runtime *runtime, const char *section, const char *key, char *value, size_t *value_size); +RESHADE_API_LIBRARY_DECL void ReShadeSetConfigValue(void *module, reshade::api::effect_runtime *runtime, const char *section, const char *key, const char *value); +RESHADE_API_LIBRARY_DECL void ReShadeSetConfigArray(void *module, reshade::api::effect_runtime *runtime, const char *section, const char *key, const char *value, size_t value_size); -RESHADE_API_LIBRARY_DECL bool ReShadeRegisterAddon(HMODULE module, uint32_t api_version); -RESHADE_API_LIBRARY_DECL void ReShadeUnregisterAddon(HMODULE module); +RESHADE_API_LIBRARY_DECL bool ReShadeRegisterAddon(void *module, uint32_t api_version); +RESHADE_API_LIBRARY_DECL void ReShadeUnregisterAddon(void *module); RESHADE_API_LIBRARY_DECL void ReShadeRegisterEvent(reshade::addon_event ev, void *callback); -RESHADE_API_LIBRARY_DECL void ReShadeRegisterEventForAddon(HMODULE module, reshade::addon_event ev, void *callback); +RESHADE_API_LIBRARY_DECL void ReShadeRegisterEventForAddon(void *module, reshade::addon_event ev, void *callback); RESHADE_API_LIBRARY_DECL void ReShadeUnregisterEvent(reshade::addon_event ev, void *callback); -RESHADE_API_LIBRARY_DECL void ReShadeUnregisterEventForAddon(HMODULE module, reshade::addon_event ev, void *callback); +RESHADE_API_LIBRARY_DECL void ReShadeUnregisterEventForAddon(void *module, reshade::addon_event ev, void *callback); RESHADE_API_LIBRARY_DECL void ReShadeRegisterOverlay(const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); -RESHADE_API_LIBRARY_DECL void ReShadeRegisterOverlayForAddon(HMODULE module, const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); +RESHADE_API_LIBRARY_DECL void ReShadeRegisterOverlayForAddon(void *module, const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); RESHADE_API_LIBRARY_DECL void ReShadeUnregisterOverlay(const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); -RESHADE_API_LIBRARY_DECL void ReShadeUnregisterOverlayForAddon(HMODULE module, const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); +RESHADE_API_LIBRARY_DECL void ReShadeUnregisterOverlayForAddon(void *module, const char *title, void(*callback)(reshade::api::effect_runtime *runtime)); RESHADE_API_LIBRARY_DECL bool ReShadeCreateEffectRuntime(reshade::api::device_api api, void *opaque_device, void *opaque_command_queue, void *opaque_swapchain, const char *config_path, reshade::api::effect_runtime **out_runtime); RESHADE_API_LIBRARY_DECL void ReShadeDestroyEffectRuntime(reshade::api::effect_runtime *runtime); @@ -50,6 +49,8 @@ RESHADE_API_LIBRARY_DECL void ReShadeUpdateAndPresentEffectRuntime(reshade::api: #else +#include + // Use the kernel32 variant of module enumeration functions so it can be safely called from 'DllMain' extern "C" BOOL WINAPI K32EnumProcessModules(HANDLE hProcess, HMODULE *lphModule, DWORD cb, LPDWORD lpcbNeeded); @@ -133,7 +134,7 @@ namespace reshade #if defined(RESHADE_API_LIBRARY) ReShadeLogMessage(nullptr, static_cast(level), message); #else - static const auto func = reinterpret_cast( + static const auto func = reinterpret_cast( GetProcAddress(internal::get_reshade_module_handle(), "ReShadeLogMessage")); func(internal::get_current_module_handle(), static_cast(level), message); #endif @@ -172,7 +173,7 @@ namespace reshade #if defined(RESHADE_API_LIBRARY) return ReShadeGetConfigValue(nullptr, runtime, section, key, value, value_size); #else - static const auto func = reinterpret_cast( + static const auto func = reinterpret_cast( GetProcAddress(internal::get_reshade_module_handle(), "ReShadeGetConfigValue")); return func(internal::get_current_module_handle(), runtime, section, key, value, value_size); #endif @@ -210,7 +211,7 @@ namespace reshade #if defined(RESHADE_API_LIBRARY) ReShadeSetConfigValue(nullptr, runtime, section, key, value); #else - static const auto func = reinterpret_cast( + static const auto func = reinterpret_cast( GetProcAddress(internal::get_reshade_module_handle(), "ReShadeSetConfigValue")); func(internal::get_current_module_handle(), runtime, section, key, value); #endif @@ -234,7 +235,7 @@ namespace reshade #if defined(RESHADE_API_LIBRARY) ReShadeSetConfigArray(nullptr, runtime, section, key, value, value_size); #else - static const auto func = reinterpret_cast( + static const auto func = reinterpret_cast( GetProcAddress(internal::get_reshade_module_handle(), "ReShadeSetConfigArray")); func(internal::get_current_module_handle(), runtime, section, key, value, value_size); #endif @@ -246,26 +247,26 @@ namespace reshade /// /// Handle of the current module. /// Handle of the ReShade module in the process, or to find it automatically. - inline bool register_addon(HMODULE addon_module, [[maybe_unused]] HMODULE reshade_module = nullptr) + inline bool register_addon(void *addon_module, [[maybe_unused]] void *reshade_module = nullptr) { #if defined(RESHADE_API_LIBRARY) return ReShadeRegisterAddon(addon_module, RESHADE_API_VERSION); #else - addon_module = internal::get_current_module_handle(addon_module); - reshade_module = internal::get_reshade_module_handle(reshade_module); + addon_module = internal::get_current_module_handle(static_cast(addon_module)); + reshade_module = internal::get_reshade_module_handle(static_cast(reshade_module)); if (reshade_module == nullptr) return false; - const auto func = reinterpret_cast( - GetProcAddress(reshade_module, "ReShadeRegisterAddon")); + const auto func = reinterpret_cast( + GetProcAddress(static_cast(reshade_module), "ReShadeRegisterAddon")); // Check that the ReShade module supports the used API if (func == nullptr || !func(addon_module, RESHADE_API_VERSION)) return false; #if defined(IMGUI_VERSION_NUM) const auto imgui_func = reinterpret_cast( - GetProcAddress(reshade_module, "ReShadeGetImGuiFunctionTable")); + GetProcAddress(static_cast(reshade_module), "ReShadeGetImGuiFunctionTable")); // Check that the ReShade module was built with Dear ImGui support and supports the used version if (imgui_func == nullptr || !(imgui_function_table_instance() = imgui_func(IMGUI_VERSION_NUM))) return false; @@ -280,19 +281,19 @@ namespace reshade /// /// Handle of the current module. /// Handle of the ReShade module in the process, or to find it automatically. - inline void unregister_addon(HMODULE addon_module, [[maybe_unused]] HMODULE reshade_module = nullptr) + inline void unregister_addon(void *addon_module, [[maybe_unused]] void *reshade_module = nullptr) { #if defined(RESHADE_API_LIBRARY) ReShadeUnregisterAddon(addon_module); #else - addon_module = internal::get_current_module_handle(addon_module); - reshade_module = internal::get_reshade_module_handle(reshade_module); + addon_module = internal::get_current_module_handle(static_cast(addon_module)); + reshade_module = internal::get_reshade_module_handle(static_cast(reshade_module)); if (reshade_module == nullptr) return; - const auto func = reinterpret_cast( - GetProcAddress(reshade_module, "ReShadeUnregisterAddon")); + const auto func = reinterpret_cast( + GetProcAddress(static_cast(reshade_module), "ReShadeUnregisterAddon")); if (func != nullptr) func(addon_module); #endif diff --git a/external/reshade/include/reshade_api.hpp b/external/reshade/include/reshade_api.hpp index ec47cb8..d4da8cf 100644 --- a/external/reshade/include/reshade_api.hpp +++ b/external/reshade/include/reshade_api.hpp @@ -88,6 +88,7 @@ namespace reshade { namespace api /// The resource the render target views point to has to be in the state. /// This call may modify current state on the command list (pipeline, render targets, descriptor tables, ...), so it may be necessary for an add-on to backup and restore state around it if the application does not bind all state again afterwards already. /// Calling this with set to zero will cause nothing to be rendered, but uniform variables to still be updated. + /// Calling this triggers a and event in other add-ons. /// /// Command list to add effect rendering commands to. /// Render target view to use for passes that write to the back buffer with SRGBWriteEnabled state set to (this should be a render target view of the target resource, created with a non-sRGB format variant). @@ -171,12 +172,12 @@ namespace reshade { namespace api /// /// Finds a specific uniform variable in the loaded effects and returns a handle to it. /// - /// File name of the effect file the variable is declared in, or to search in all loaded effects. - /// Name of the uniform variable declaration to find. - /// Opaque handle to the uniform variable, or zero in case it was not found. /// /// This will not find uniform variables when performance mode is enabled, since in that case uniform variables are replaced with constants during effect compilation. /// + /// File name of the effect file the variable is declared in, or to search in all loaded effects. + /// Name of the uniform variable declaration to find. + /// Opaque handle to the uniform variable, or zero in case it was not found. virtual effect_uniform_variable find_uniform_variable(const char *effect_name, const char *variable_name) const = 0; /// @@ -295,14 +296,15 @@ namespace reshade { namespace api /// /// Sets the value of the specified uniform as boolean values. /// + /// + /// Setting the uniform value will not automatically save the current preset. + /// To make sure the current preset with the changed value is saved to disk, explicitly call . + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the uniform variable. /// Pointer to an array of booleans that are used to update this uniform variable. /// Number of values to write. /// Array offset to start writing values to when this uniform variable is an array variable. - /// - /// Setting the uniform value will not automatically save the current preset. - /// To make sure the current preset with the changed value is saved to disk, explicitly call . - /// virtual void set_uniform_value_bool(effect_uniform_variable variable, const bool *values, size_t count, size_t array_index = 0) = 0; /// /// Sets the value of the specified uniform as a vector of boolean values. @@ -320,14 +322,15 @@ namespace reshade { namespace api /// /// Sets the value of the specified uniform as floating-point values. /// + /// + /// Setting the uniform value will not automatically save the current preset. + /// To make sure the current preset with the changed value is saved to disk, explicitly call . + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the uniform variable. /// Pointer to an array of floating-points that are used to update this uniform variable. /// Number of values to write. /// Array offset to start writing values to when this uniform variable is an array variable. - /// - /// Setting the uniform value will not automatically save the current preset. - /// To make sure the current preset with the changed value is saved to disk, explicitly call . - /// virtual void set_uniform_value_float(effect_uniform_variable variable, const float *values, size_t count, size_t array_index = 0) = 0; /// /// Sets the value of the specified uniform as a vector of floating-point values. @@ -345,14 +348,15 @@ namespace reshade { namespace api /// /// Sets the value of the specified uniform as signed integer values. /// + /// + /// Setting the uniform value will not automatically save the current preset. + /// To make sure the current preset with the changed value is saved to disk, explicitly call . + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the uniform variable. /// Pointer to an array of signed integers that are used to update this uniform variable. /// Number of values to write. /// Array offset to start writing values to when this uniform variable is an array variable. - /// - /// Setting the uniform value will not automatically save the current preset. - /// To make sure the current preset with the changed value is saved to disk, explicitly call . - /// virtual void set_uniform_value_int(effect_uniform_variable variable, const int32_t *values, size_t count, size_t array_index = 0) = 0; /// /// Sets the value of the specified uniform as a vector of signed integer values. @@ -370,14 +374,15 @@ namespace reshade { namespace api /// /// Sets the value of the specified uniform as unsigned integer values. /// + /// + /// Setting the uniform value will not automatically save the current preset. + /// To make sure the current preset with the changed value is saved to disk, explicitly call . + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the uniform variable. /// Pointer to an array of unsigned integers that are used to update this uniform variable. /// Number of values to write. /// Array offset to start writing values to when this uniform variable is an array variable. - /// - /// Setting the uniform value will not automatically save the current preset. - /// To make sure the current preset with the changed value is saved to disk, explicitly call . - /// virtual void set_uniform_value_uint(effect_uniform_variable variable, const uint32_t *values, size_t count, size_t array_index = 0) = 0; /// /// Sets the value of the specified uniform as a vector of unsigned integer values. @@ -622,6 +627,9 @@ namespace reshade { namespace api /// /// Enables or disables the specified . /// + /// + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the technique. /// Set to to enable the technique, or to disable it. virtual void set_technique_state(effect_technique technique, bool enabled) = 0; @@ -654,6 +662,7 @@ namespace reshade { namespace api /// The width and height of the specified render target should match those used to render all other effects! /// The resource the render target views point to has to be in the state. /// This call may modify current state on the command list (pipeline, render targets, descriptor tables, ...), so it may be necessary for an add-on to backup and restore state around it if the application does not bind all state again afterwards already. + /// Calling this triggers a event in other add-ons. /// /// Opaque handle to the technique. /// Command list to add effect rendering commands to. @@ -668,6 +677,9 @@ namespace reshade { namespace api /// /// Enables or disables all effects. /// + /// + /// Calling this triggers a event in other add-ons. + /// /// Set to to enable effects, or to disable them. virtual void set_effects_state(bool enabled) = 0; @@ -686,12 +698,18 @@ namespace reshade { namespace api /// /// Saves the currently active preset and then switches to the specified new preset. /// + /// + /// Calling this triggers a event in other add-ons. + /// /// File path to the preset to switch to. virtual void set_current_preset_path(const char *path) = 0; /// /// Changes the rendering order of loaded techniques to that of the specified technique list. /// + /// + /// Calling this triggers a event in other add-ons. + /// /// Number of handles in the technique list. /// Array of techniques in the order they should be rendered in. virtual void reorder_techniques(size_t count, const effect_technique *techniques) = 0; @@ -784,6 +802,9 @@ namespace reshade { namespace api /// /// Open or close the ReShade overlay. /// + /// + /// Calling this triggers a event in other add-ons. + /// /// Requested overlay state. /// Source of this request. /// if the overlay state was changed, otherwise. @@ -797,6 +818,9 @@ namespace reshade { namespace api /// /// Resets the value of the specified uniform . /// + /// + /// Calling this triggers a event in other add-ons. + /// /// Opaque handle to the uniform variable. virtual void reset_uniform_value(effect_uniform_variable variable) = 0; @@ -812,5 +836,11 @@ namespace reshade { namespace api /// /// File path to the preset to save to. virtual void export_current_preset(const char *path) const = 0; + + /// + /// Captures a screenshot of the current back buffer resource and saves it to an image file on disk. + /// + /// Optional string to append to the screenshot filename, or for no postfix. + virtual void save_screenshot(const char *postfix = nullptr) = 0; }; } } diff --git a/external/reshade/include/reshade_api_device.hpp b/external/reshade/include/reshade_api_device.hpp index ee4ecb2..7e9a9bd 100644 --- a/external/reshade/include/reshade_api_device.hpp +++ b/external/reshade/include/reshade_api_device.hpp @@ -186,6 +186,16 @@ namespace reshade { namespace api /// If this feature is not present, , , , and must not be used. /// ray_tracing, + /// + /// Specifies whether deferred buffer updates can be used. + /// If this feature is not present, must not be used. + /// + update_buffer_region_command, + /// + /// Specifies whether deferred texture updates can be used. + /// If this feature is not present, must not be used. + /// + update_texture_region_command, }; /// @@ -206,17 +216,17 @@ namespace reshade { namespace api /// driver_version, /// - /// PCI vendor ID of the hardware associated with the logical render device. + /// PCI vendor ID of the adapter associated with the device. /// Data is a 32-bit unsigned integer value. /// vendor_id, /// - /// PCI device ID of the hardware associated with the logical render device. + /// PCI device ID of the adapter associated with the device. /// Data is a 32-bit unsigned integer value. /// device_id, /// - /// Description text of the hardware associated with the logical render device. + /// Description text of the adapter associated with the device. /// Data is an array of 256 byte-sized characters representing a null-terminated string. /// description, @@ -235,6 +245,11 @@ namespace reshade { namespace api /// Data is a 32-bit unsigned integer value. /// shader_group_handle_alignment, + /// + /// Local identifier of the adapter associated with the device. + /// Data is a 64-bit unsigned integer value, or more accurately a LUID object. + /// + adapter_luid, }; /// @@ -298,7 +313,7 @@ namespace reshade { namespace api }; /// - /// A logical render device, used for resource creation and global operations. + /// A device, used for resource creation and global operations. /// Functionally equivalent to a 'IDirect3DDevice9', 'ID3D10Device', 'ID3D11Device', 'ID3D12Device', 'HGLRC' or 'VkDevice'. /// /// @@ -412,7 +427,7 @@ namespace reshade { namespace api virtual void unmap_texture_region(resource resource, uint32_t subresource) = 0; /// - /// Uploads data to a buffer resource. + /// Uploads data to a buffer resource immediately. /// /// Pointer to the data to upload. /// Buffer resource to upload to. @@ -420,7 +435,7 @@ namespace reshade { namespace api /// Number of bytes to upload. virtual void update_buffer_region(const void *data, resource resource, uint64_t offset, uint64_t size) = 0; /// - /// Uploads data to a texture resource. + /// Uploads data to a texture resource immediately. /// /// Pointer to the data to upload. /// Texture resource to upload to. @@ -627,7 +642,7 @@ namespace reshade { namespace api }; /// - /// The base class for objects that are children to a logical render . + /// The base class for objects that are children to a . /// struct __declspec(novtable) device_object : public api_object { @@ -813,7 +828,7 @@ namespace reshade { namespace api /// Optional pointer to an array of size values, one for each buffer. Can be or have elements set to UINT64_MAX to use the entire buffer. /// Pointer to the first element of an array of counter buffer resources. These resources must have been created with the usage. /// Pointer to the first element of an array of counter offset values, one for each counter buffer. Each offset is the number of bytes from the start of the counter buffer to the first element to write to. - virtual void bind_stream_output_buffers(uint32_t first, uint32_t count, const api::resource *buffers, const uint64_t *offsets, const uint64_t *max_sizes, const api::resource *counter_buffers, const uint64_t *counter_offsets) = 0; + virtual void bind_stream_output_buffers(uint32_t first, uint32_t count, const resource *buffers, const uint64_t *offsets, const uint64_t *max_sizes, const resource *counter_buffers, const uint64_t *counter_offsets) = 0; /// /// Draws non-indexed primitives. @@ -1104,7 +1119,7 @@ namespace reshade { namespace api /// Acceleration structure to read data from when is , otherwise zero. /// Acceleration structure to write data to. /// Choose between building a new or updating an existing acceleration structure. - virtual void build_acceleration_structure(acceleration_structure_type type, acceleration_structure_build_flags flags, uint32_t input_count, const acceleration_structure_build_input *inputs, api::resource scratch, uint64_t scratch_offset, resource_view source, resource_view dest, acceleration_structure_build_mode mode) = 0; + virtual void build_acceleration_structure(acceleration_structure_type type, acceleration_structure_build_flags flags, uint32_t input_count, const acceleration_structure_build_input *inputs, resource scratch, uint64_t scratch_offset, resource_view source, resource_view dest, acceleration_structure_build_mode mode) = 0; /// /// Queries acceleration structure size parameters. @@ -1116,6 +1131,31 @@ namespace reshade { namespace api /// Type of the acceleration structure query. /// Index of the first query in the query heap to write the result to. virtual void query_acceleration_structures(uint32_t count, const resource_view *acceleration_structures, query_heap heap, query_type type, uint32_t first) = 0; + + /// + /// Uploads data to a buffer resource when the command list is executed. + /// + /// + /// The ination resource has to be in the state. + /// + /// + /// Pointer to the data to upload. + /// Buffer resource to upload to. + /// Offset (in bytes) into the buffer resource to start uploading to. + /// Number of bytes to upload. + virtual void update_buffer_region(const void *data, resource dest, uint64_t dest_offset, uint64_t size) = 0; + /// + /// Uploads data to a texture resource when the command list is executed. + /// + /// + /// The ination resource has to be in the state. + /// + /// + /// Pointer to the data to upload. + /// Texture resource to upload to. + /// Index of the subresource to upload to (level + (layer * levels)). + /// Optional 3D box (or to reference the entire subresource) that defines the region in the to upload to. + virtual void update_texture_region(const subresource_data &data, resource dest, uint32_t dest_subresource, const subresource_box *dest_box = nullptr) = 0; }; /// @@ -1224,7 +1264,7 @@ namespace reshade { namespace api /// /// Swap chain creation flags. - /// Depending on the graphics API this can be a 'D3DPRESENT', 'DXGI_PRESENT', 'PFD_*' or 'VkSwapchainCreateFlagsKHR' value. + /// Depending on the graphics API this can be a 'D3DPRESENT', 'DXGI_SWAP_CHAIN_FLAG', 'PFD_*' or 'VkSwapchainCreateFlagsKHR' value. /// uint32_t present_flags = 0; diff --git a/external/reshade/include/reshade_api_format.hpp b/external/reshade/include/reshade_api_format.hpp index 77d75eb..8c117fa 100644 --- a/external/reshade/include/reshade_api_format.hpp +++ b/external/reshade/include/reshade_api_format.hpp @@ -186,10 +186,18 @@ namespace reshade { namespace api { unknown = 0, - srgb_nonlinear, - extended_srgb_linear, - hdr10_st2084, + // BT.709/sRGB primaries + srgb, + // BT.709/sRGB primaries + linear + scrgb, + // BT.2020 primaries + PQ transfer function + hdr10_pq, + // BT.2020 primaries + HLG transfer function hdr10_hlg, + + srgb_nonlinear = srgb, + extended_srgb_linear = scrgb, + hdr10_st2084 = hdr10_pq, }; /// @@ -306,7 +314,7 @@ namespace reshade { namespace api case format::bc3_typeless: case format::bc3_unorm: case format::bc3_unorm_srgb: - return format::bc2_typeless; + return format::bc3_typeless; case format::bc4_typeless: case format::bc4_unorm: case format::bc4_snorm: @@ -480,6 +488,8 @@ namespace reshade { namespace api case format::b8g8r8x8_unorm: case format::b8g8r8x8_unorm_srgb: return 8; + case format::r9g9b9e5: + return 9; case format::r10g10b10a2_typeless: case format::r10g10b10a2_unorm: case format::r10g10b10a2_xr_bias: diff --git a/external/reshade/include/reshade_api_pipeline.hpp b/external/reshade/include/reshade_api_pipeline.hpp index 988054f..b1c2941 100644 --- a/external/reshade/include/reshade_api_pipeline.hpp +++ b/external/reshade/include/reshade_api_pipeline.hpp @@ -6,6 +6,7 @@ #pragma once #include "reshade_api_resource.hpp" +#include namespace reshade { namespace api { @@ -83,6 +84,14 @@ namespace reshade { namespace api /// sampler_with_resource_view = 1, /// + /// Descriptors are either of type or . + /// + shader_resource_view = 2, + /// + /// Descriptors are either of type or . + /// + unordered_access_view = 3, + /// /// Descriptors are an array of . /// buffer_shader_resource_view = 4, @@ -93,19 +102,11 @@ namespace reshade { namespace api /// /// Descriptors are an array of . /// - texture_shader_resource_view = 2, + texture_shader_resource_view = shader_resource_view, /// /// Descriptors are an array of . /// - texture_unordered_access_view = 3, - /// - /// Descriptors are either of type or . - /// - shader_resource_view = texture_shader_resource_view, - /// - /// Descriptors are either of type or . - /// - unordered_access_view = texture_unordered_access_view, + texture_unordered_access_view = unordered_access_view, /// /// Descriptors are an array of . /// @@ -117,7 +118,7 @@ namespace reshade { namespace api /// /// Descriptors are an array of . /// - acceleration_structure = 8 + acceleration_structure = 10 }; /// diff --git a/external/reshade/include/reshade_api_resource.hpp b/external/reshade/include/reshade_api_resource.hpp index 116f639..5c8eb8d 100644 --- a/external/reshade/include/reshade_api_resource.hpp +++ b/external/reshade/include/reshade_api_resource.hpp @@ -197,6 +197,11 @@ namespace reshade { namespace api /// dynamic = (1 << 3), /// + /// Immutable resources can never be written to again after creationn, either by the CPU or the GPU. + /// The flag is only supported in D3D10 and D3D11. + /// + immutable = (1 << 4), + /// /// Required to create or views of the resource. /// cube_compatible = (1 << 2), diff --git a/external/reshade/include/reshade_events.hpp b/external/reshade/include/reshade_events.hpp index 1b4ebf1..8b72a05 100644 --- a/external/reshade/include/reshade_events.hpp +++ b/external/reshade/include/reshade_events.hpp @@ -553,22 +553,37 @@ namespace reshade /// /// ID3D10Device::UpdateSubresource /// ID3D11DeviceContext::UpdateSubresource + /// ID3D11DeviceContext1::UpdateSubresource1 /// glBufferSubData /// glNamedBufferSubData /// /// Callback function signature: bool (api::device *device, const void *data, api::resource resource, uint64_t offset, uint64_t size) /// /// + /// To prevent this action from being executed, return , otherwise return . + /// + update_buffer_region = 24, + /// + /// Called before: + /// + /// ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) + /// ID3D11DeviceContext1::UpdateSubresource1 (on deferred device contexts) + /// vkCmdUpdateBuffer + /// + /// Callback function signature: bool (api::command_list *cmd_list, const void *data, api::resource dest, uint64_t dest_offset, uint64_t size) + /// + /// /// To prevent this command from being executed, return , otherwise return . /// Destination resource will be in the state. /// - update_buffer_region, + update_buffer_region_command = 98, /// /// Called before: /// /// ID3D10Device::UpdateSubresource /// ID3D11DeviceContext::UpdateSubresource + /// ID3D11DeviceContext1::UpdateSubresource1 /// glTexSubData1D /// glTexSubData2D /// glTexSubData3D @@ -585,10 +600,22 @@ namespace reshade /// Callback function signature: bool (api::device *device, const api::subresource_data &data, api::resource resource, uint32_t subresource, const api::subresource_box *box) /// /// + /// To prevent this action from being executed, return , otherwise return . + /// + update_texture_region = 25, + /// + /// Called before: + /// + /// ID3D11DeviceContext::UpdateSubresource (on deferred device contexts) + /// ID3D11DeviceContext1::UpdateSubresource1 (on deferred device contexts) + /// + /// Callback function signature: bool (api::command_list *cmd_list, const api::subresource_data &data, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box) + /// + /// /// To prevent this command from being executed, return , otherwise return . /// Destination resource will be in the state. /// - update_texture_region, + update_texture_region_command = 99, /// /// Called after successful pipeline creation from: @@ -636,7 +663,7 @@ namespace reshade /// /// May be called multiple times with the same pipeline handle (whenever the pipeline is updated or its reference count is incremented). /// - init_pipeline, + init_pipeline = 26, /// /// Called on pipeline creation, before: @@ -1036,8 +1063,8 @@ namespace reshade /// glBindImageTextures /// glBindTextureUnit /// glBindMultiTextureEXT - /// vkCmdPushDescriptorSetKHR - /// vkCmdPushDescriptorSetWithTemplateKHR + /// vkCmdPushDescriptorSet + /// vkCmdPushDescriptorSetWithTemplate /// /// Callback function signature: void (api::command_list *cmd_list, api::shader_stage stages, api::pipeline_layout layout, uint32_t layout_param, const api::descriptor_table_update &update) /// @@ -1126,6 +1153,7 @@ namespace reshade /// glDrawArraysInstancedBaseInstance /// glMultiDrawArrays /// vkCmdDraw + /// vkCmdDrawMultiEXT /// /// Callback function signature: bool (api::command_list *cmd_list, uint32_t vertex_count, uint32_t instance_count, uint32_t first_vertex, uint32_t first_instance) /// @@ -1153,6 +1181,7 @@ namespace reshade /// glMultiDrawElements /// glMultiDrawElementsBaseVertex /// vkCmdDrawIndexed + /// vkCmdDrawMultiIndexedEXT /// /// Callback function signature: bool (api::command_list *cmd_list, uint32_t index_count, uint32_t instance_count, uint32_t first_index, int32_t vertex_offset, uint32_t first_instance) /// @@ -1250,6 +1279,8 @@ namespace reshade /// /// Called before: /// + /// ID3D11DeviceContext::CopySubresourceRegion + /// ID3D11DeviceContext1::CopySubresourceRegion1 /// ID3D12GraphicsCommandList::CopyBufferRegion /// glCopyBufferSubData /// glCopyNamedBufferSubData @@ -1289,6 +1320,7 @@ namespace reshade /// IDirect3DDevice9::StretchRect /// ID3D10Device::CopySubresourceRegion /// ID3D11DeviceContext::CopySubresourceRegion + /// ID3D11DeviceContext1::CopySubresourceRegion1 /// ID3D12GraphicsCommandList::CopyTextureRegion /// glBlitFramebuffer /// glBlitNamedFramebuffer @@ -1530,6 +1562,7 @@ namespace reshade /// /// Called before: /// + /// ID3D11DeviceContext::FinishCommandList /// ID3D12GraphicsCommandList::Reset /// vkBeginCommandBuffer /// @@ -1604,6 +1637,21 @@ namespace reshade /// The source and destination rectangle arguments are optional and may be (which indicates the swap chain is presented in its entirety). /// present, + /// + /// Called after successful presentation, from: + /// + /// IDirect3DDevice9::Present + /// IDirect3DDevice9Ex::PresentEx + /// IDirect3DSwapChain9::Present + /// IDXGISwapChain::Present + /// IDXGISwapChain3::Present1 + /// ID3D12CommandQueueDownlevel::Present + /// wglSwapBuffers + /// vkQueuePresentKHR + /// + /// Callback function signature: void (api::command_queue *queue, api::swapchain *swapchain) + /// + finish_present = 100, /// /// Called before: @@ -1740,7 +1788,7 @@ namespace reshade reshade_overlay_technique, #if RESHADE_ADDON - max = 98 // Last value used internally by ReShade to determine number of events in this enum + max = 101 // Last value used internally by ReShade to determine number of events in this enum #endif }; @@ -1854,6 +1902,9 @@ namespace reshade RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::build_acceleration_structure, bool, api::command_list *cmd_list, api::acceleration_structure_type type, api::acceleration_structure_build_flags flags, uint32_t input_count, const api::acceleration_structure_build_input *inputs, api::resource scratch, uint64_t scratch_offset, api::resource_view source, api::resource_view dest, api::acceleration_structure_build_mode mode); RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::query_acceleration_structures, bool, api::command_list *cmd_list, uint32_t count, const api::resource_view *acceleration_structures, api::query_heap heap, api::query_type type, uint32_t first); + RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_buffer_region_command, bool, api::command_list *cmd_list, const void *data, api::resource dest, uint64_t dest_offset, uint64_t size); + RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::update_texture_region_command, bool, api::command_list *cmd_list, const api::subresource_data &data, api::resource dest, uint32_t dest_subresource, const api::subresource_box *dest_box); + RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reset_command_list, void, api::command_list *cmd_list); RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::close_command_list, void, api::command_list *cmd_list); @@ -1861,6 +1912,7 @@ namespace reshade RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::execute_secondary_command_list, void, api::command_list *cmd_list, api::command_list *secondary_cmd_list); RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::present, void, api::command_queue *queue, api::swapchain *swapchain, const api::rect *source_rect, const api::rect *dest_rect, uint32_t dirty_rect_count, const api::rect *dirty_rects); + RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::finish_present, void, api::command_queue *queue, api::swapchain *swapchain); RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::set_fullscreen_state, bool, api::swapchain *swapchain, bool fullscreen, void *hmonitor); RESHADE_DEFINE_ADDON_EVENT_TRAITS(addon_event::reshade_present, void, api::effect_runtime *runtime); diff --git a/external/reshade/include/reshade_overlay.hpp b/external/reshade/include/reshade_overlay.hpp index 13fc727..9498626 100644 --- a/external/reshade/include/reshade_overlay.hpp +++ b/external/reshade/include/reshade_overlay.hpp @@ -6,14 +6,14 @@ #if defined(IMGUI_VERSION_NUM) -#if IMGUI_VERSION_NUM != 19191 -#error Unexpected ImGui version, please update the "imgui.h" header to version 19191! +#if IMGUI_VERSION_NUM != 19222 +#error Unexpected ImGui version, please update the "imgui.h" header to version 19222! #endif // Check that the 'ImTextureID' type has the same size as 'reshade::api::resource_view' static_assert(sizeof(ImTextureID) == 8, "missing \"#define ImTextureID ImU64\" before \"#include \""); -struct imgui_function_table_19191 +struct imgui_function_table_19222 { ImGuiIO&(*GetIO)(); ImGuiStyle&(*GetStyle)(); @@ -45,7 +45,6 @@ struct imgui_function_table_19191 void(*SetWindowSize)(const ImVec2& size, ImGuiCond cond); void(*SetWindowCollapsed)(bool collapsed, ImGuiCond cond); void(*SetWindowFocus)(); - void(*SetWindowFontScale)(float scale); void(*SetWindowPos2)(const char* name, const ImVec2& pos, ImGuiCond cond); void(*SetWindowSize2)(const char* name, const ImVec2& size, ImGuiCond cond); void(*SetWindowCollapsed2)(const char* name, bool collapsed, ImGuiCond cond); @@ -60,8 +59,11 @@ struct imgui_function_table_19191 void(*SetScrollHereY)(float center_y_ratio); void(*SetScrollFromPosX)(float local_x, float center_x_ratio); void(*SetScrollFromPosY)(float local_y, float center_y_ratio); - void(*PushFont)(ImFont* font); + void(*PushFont)(ImFont* font, float font_size_base_unscaled); void(*PopFont)(); + ImFont*(*GetFont)(); + float(*GetFontSize)(); + ImFontBaked*(*GetFontBaked)(); void(*PushStyleColor)(ImGuiCol idx, ImU32 col); void(*PushStyleColor2)(ImGuiCol idx, const ImVec4& col); void(*PopStyleColor)(int count); @@ -78,8 +80,6 @@ struct imgui_function_table_19191 float(*CalcItemWidth)(); void(*PushTextWrapPos)(float wrap_local_pos_x); void(*PopTextWrapPos)(); - ImFont*(*GetFont)(); - float(*GetFontSize)(); ImVec2(*GetFontTexUvWhitePixel)(); ImU32(*GetColorU32)(ImGuiCol idx, float alpha_mul); ImU32(*GetColorU322)(const ImVec4& col); @@ -138,10 +138,10 @@ struct imgui_function_table_19191 void(*ProgressBar)(float fraction, const ImVec2& size_arg, const char* overlay); void(*Bullet)(); bool(*TextLink)(const char* label); - void(*TextLinkOpenURL)(const char* label, const char* url); - void(*Image)(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1); - void(*ImageWithBg)(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col); - bool(*ImageButton)(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col); + bool(*TextLinkOpenURL)(const char* label, const char* url); + void(*Image)(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1); + void(*ImageWithBg)(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col); + bool(*ImageButton)(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col); bool(*BeginCombo)(const char* label, const char* preview_value, ImGuiComboFlags flags); void(*EndCombo)(); bool(*Combo)(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items); @@ -393,8 +393,8 @@ struct imgui_function_table_19191 void(*ImDrawList_PushClipRect)(ImDrawList *_this, const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect); void(*ImDrawList_PushClipRectFullScreen)(ImDrawList *_this); void(*ImDrawList_PopClipRect)(ImDrawList *_this); - void(*ImDrawList_PushTextureID)(ImDrawList *_this, ImTextureID texture_id); - void(*ImDrawList_PopTextureID)(ImDrawList *_this); + void(*ImDrawList_PushTexture)(ImDrawList *_this, ImTextureRef tex_ref); + void(*ImDrawList_PopTexture)(ImDrawList *_this); void(*ImDrawList_AddLine)(ImDrawList *_this, const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness); void(*ImDrawList_AddRect)(ImDrawList *_this, const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness); void(*ImDrawList_AddRectFilled)(ImDrawList *_this, const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags); @@ -416,9 +416,9 @@ struct imgui_function_table_19191 void(*ImDrawList_AddPolyline)(ImDrawList *_this, const ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness); void(*ImDrawList_AddConvexPolyFilled)(ImDrawList *_this, const ImVec2* points, int num_points, ImU32 col); void(*ImDrawList_AddConcavePolyFilled)(ImDrawList *_this, const ImVec2* points, int num_points, ImU32 col); - void(*ImDrawList_AddImage)(ImDrawList *_this, ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col); - void(*ImDrawList_AddImageQuad)(ImDrawList *_this, ImTextureID user_texture_id, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1, const ImVec2& uv2, const ImVec2& uv3, const ImVec2& uv4, ImU32 col); - void(*ImDrawList_AddImageRounded)(ImDrawList *_this, ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags); + void(*ImDrawList_AddImage)(ImDrawList *_this, ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col); + void(*ImDrawList_AddImageQuad)(ImDrawList *_this, ImTextureRef tex_ref, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1, const ImVec2& uv2, const ImVec2& uv3, const ImVec2& uv4, ImU32 col); + void(*ImDrawList_AddImageRounded)(ImDrawList *_this, ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags); void(*ImDrawList_PathArcTo)(ImDrawList *_this, const ImVec2& center, float radius, float a_min, float a_max, int num_segments); void(*ImDrawList_PathArcToFast)(ImDrawList *_this, const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12); void(*ImDrawList_PathEllipticalArcTo)(ImDrawList *_this, const ImVec2& center, const ImVec2& radius, float rot, float a_min, float a_max, int num_segments); @@ -435,16 +435,11 @@ struct imgui_function_table_19191 void(*ImDrawList_PrimQuadUV)(ImDrawList *_this, const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col); void(*ConstructImFont)(ImFont *_this); void(*DestructImFont)(ImFont *_this); - ImFontGlyph*(*ImFont_FindGlyph)(ImFont *_this, ImWchar c); - ImFontGlyph*(*ImFont_FindGlyphNoFallback)(ImFont *_this, ImWchar c); - ImVec2(*ImFont_CalcTextSizeA)(ImFont *_this, float size, float max_width, float wrap_width, const char* text_begin, const char* text_end, const char** remaining); - const char*(*ImFont_CalcWordWrapPositionA)(ImFont *_this, float scale, const char* text, const char* text_end, float wrap_width); - void(*ImFont_RenderChar)(ImFont *_this, ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c); - void(*ImFont_RenderText)(ImFont *_this, ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip); + bool(*ImFont_IsGlyphInFont)(ImFont *_this, ImWchar c); }; -using imgui_function_table = imgui_function_table_19191; +using imgui_function_table = imgui_function_table_19222; inline const imgui_function_table *&imgui_function_table_instance() { @@ -486,7 +481,6 @@ namespace ImGui inline void SetWindowSize(const ImVec2& size, ImGuiCond cond) { imgui_function_table_instance()->SetWindowSize(size, cond); } inline void SetWindowCollapsed(bool collapsed, ImGuiCond cond) { imgui_function_table_instance()->SetWindowCollapsed(collapsed, cond); } inline void SetWindowFocus() { imgui_function_table_instance()->SetWindowFocus(); } - inline void SetWindowFontScale(float scale) { imgui_function_table_instance()->SetWindowFontScale(scale); } inline void SetWindowPos(const char* name, const ImVec2& pos, ImGuiCond cond) { imgui_function_table_instance()->SetWindowPos2(name, pos, cond); } inline void SetWindowSize(const char* name, const ImVec2& size, ImGuiCond cond) { imgui_function_table_instance()->SetWindowSize2(name, size, cond); } inline void SetWindowCollapsed(const char* name, bool collapsed, ImGuiCond cond) { imgui_function_table_instance()->SetWindowCollapsed2(name, collapsed, cond); } @@ -501,8 +495,11 @@ namespace ImGui inline void SetScrollHereY(float center_y_ratio) { imgui_function_table_instance()->SetScrollHereY(center_y_ratio); } inline void SetScrollFromPosX(float local_x, float center_x_ratio) { imgui_function_table_instance()->SetScrollFromPosX(local_x, center_x_ratio); } inline void SetScrollFromPosY(float local_y, float center_y_ratio) { imgui_function_table_instance()->SetScrollFromPosY(local_y, center_y_ratio); } - inline void PushFont(ImFont* font) { imgui_function_table_instance()->PushFont(font); } + inline void PushFont(ImFont* font, float font_size_base_unscaled) { imgui_function_table_instance()->PushFont(font, font_size_base_unscaled); } inline void PopFont() { imgui_function_table_instance()->PopFont(); } + inline ImFont* GetFont() { return imgui_function_table_instance()->GetFont(); } + inline float GetFontSize() { return imgui_function_table_instance()->GetFontSize(); } + inline ImFontBaked* GetFontBaked() { return imgui_function_table_instance()->GetFontBaked(); } inline void PushStyleColor(ImGuiCol idx, ImU32 col) { imgui_function_table_instance()->PushStyleColor(idx, col); } inline void PushStyleColor(ImGuiCol idx, const ImVec4& col) { imgui_function_table_instance()->PushStyleColor2(idx, col); } inline void PopStyleColor(int count) { imgui_function_table_instance()->PopStyleColor(count); } @@ -519,8 +516,6 @@ namespace ImGui inline float CalcItemWidth() { return imgui_function_table_instance()->CalcItemWidth(); } inline void PushTextWrapPos(float wrap_local_pos_x) { imgui_function_table_instance()->PushTextWrapPos(wrap_local_pos_x); } inline void PopTextWrapPos() { imgui_function_table_instance()->PopTextWrapPos(); } - inline ImFont* GetFont() { return imgui_function_table_instance()->GetFont(); } - inline float GetFontSize() { return imgui_function_table_instance()->GetFontSize(); } inline ImVec2 GetFontTexUvWhitePixel() { return imgui_function_table_instance()->GetFontTexUvWhitePixel(); } inline ImU32 GetColorU32(ImGuiCol idx, float alpha_mul) { return imgui_function_table_instance()->GetColorU32(idx, alpha_mul); } inline ImU32 GetColorU32(const ImVec4& col) { return imgui_function_table_instance()->GetColorU322(col); } @@ -585,10 +580,10 @@ namespace ImGui inline void ProgressBar(float fraction, const ImVec2& size_arg, const char* overlay) { imgui_function_table_instance()->ProgressBar(fraction, size_arg, overlay); } inline void Bullet() { imgui_function_table_instance()->Bullet(); } inline bool TextLink(const char* label) { return imgui_function_table_instance()->TextLink(label); } - inline void TextLinkOpenURL(const char* label, const char* url) { imgui_function_table_instance()->TextLinkOpenURL(label, url); } - inline void Image(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1) { imgui_function_table_instance()->Image(user_texture_id, image_size, uv0, uv1); } - inline void ImageWithBg(ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) { imgui_function_table_instance()->ImageWithBg(user_texture_id, image_size, uv0, uv1, bg_col, tint_col); } - inline bool ImageButton(const char* str_id, ImTextureID user_texture_id, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) { return imgui_function_table_instance()->ImageButton(str_id, user_texture_id, image_size, uv0, uv1, bg_col, tint_col); } + inline bool TextLinkOpenURL(const char* label, const char* url) { return imgui_function_table_instance()->TextLinkOpenURL(label, url); } + inline void Image(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1) { imgui_function_table_instance()->Image(tex_ref, image_size, uv0, uv1); } + inline void ImageWithBg(ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) { imgui_function_table_instance()->ImageWithBg(tex_ref, image_size, uv0, uv1, bg_col, tint_col); } + inline bool ImageButton(const char* str_id, ImTextureRef tex_ref, const ImVec2& image_size, const ImVec2& uv0, const ImVec2& uv1, const ImVec4& bg_col, const ImVec4& tint_col) { return imgui_function_table_instance()->ImageButton(str_id, tex_ref, image_size, uv0, uv1, bg_col, tint_col); } inline bool BeginCombo(const char* label, const char* preview_value, ImGuiComboFlags flags) { return imgui_function_table_instance()->BeginCombo(label, preview_value, flags); } inline void EndCombo() { imgui_function_table_instance()->EndCombo(); } inline bool Combo(const char* label, int* current_item, const char* const items[], int items_count, int popup_max_height_in_items) { return imgui_function_table_instance()->Combo(label, current_item, items, items_count, popup_max_height_in_items); } @@ -849,8 +844,8 @@ inline ImDrawList::~ImDrawList() { imgui_function_table_instance()->DestructImDr inline void ImDrawList::PushClipRect(const ImVec2& clip_rect_min, const ImVec2& clip_rect_max, bool intersect_with_current_clip_rect) { imgui_function_table_instance()->ImDrawList_PushClipRect(this, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); } inline void ImDrawList::PushClipRectFullScreen() { imgui_function_table_instance()->ImDrawList_PushClipRectFullScreen(this); } inline void ImDrawList::PopClipRect() { imgui_function_table_instance()->ImDrawList_PopClipRect(this); } -inline void ImDrawList::PushTextureID(ImTextureID texture_id) { imgui_function_table_instance()->ImDrawList_PushTextureID(this, texture_id); } -inline void ImDrawList::PopTextureID() { imgui_function_table_instance()->ImDrawList_PopTextureID(this); } +inline void ImDrawList::PushTexture(ImTextureRef tex_ref) { imgui_function_table_instance()->ImDrawList_PushTexture(this, tex_ref); } +inline void ImDrawList::PopTexture() { imgui_function_table_instance()->ImDrawList_PopTexture(this); } inline void ImDrawList::AddLine(const ImVec2& p1, const ImVec2& p2, ImU32 col, float thickness) { imgui_function_table_instance()->ImDrawList_AddLine(this, p1, p2, col, thickness); } inline void ImDrawList::AddRect(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags, float thickness) { imgui_function_table_instance()->ImDrawList_AddRect(this, p_min, p_max, col, rounding, flags, thickness); } inline void ImDrawList::AddRectFilled(const ImVec2& p_min, const ImVec2& p_max, ImU32 col, float rounding, ImDrawFlags flags) { imgui_function_table_instance()->ImDrawList_AddRectFilled(this, p_min, p_max, col, rounding, flags); } @@ -872,9 +867,9 @@ inline void ImDrawList::AddBezierQuadratic(const ImVec2& p1, const ImVec2& p2, c inline void ImDrawList::AddPolyline(const ImVec2* points, int num_points, ImU32 col, ImDrawFlags flags, float thickness) { imgui_function_table_instance()->ImDrawList_AddPolyline(this, points, num_points, col, flags, thickness); } inline void ImDrawList::AddConvexPolyFilled(const ImVec2* points, int num_points, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddConvexPolyFilled(this, points, num_points, col); } inline void ImDrawList::AddConcavePolyFilled(const ImVec2* points, int num_points, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddConcavePolyFilled(this, points, num_points, col); } -inline void ImDrawList::AddImage(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddImage(this, user_texture_id, p_min, p_max, uv_min, uv_max, col); } -inline void ImDrawList::AddImageQuad(ImTextureID user_texture_id, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1, const ImVec2& uv2, const ImVec2& uv3, const ImVec2& uv4, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddImageQuad(this, user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } -inline void ImDrawList::AddImageRounded(ImTextureID user_texture_id, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags) { imgui_function_table_instance()->ImDrawList_AddImageRounded(this, user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); } +inline void ImDrawList::AddImage(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddImage(this, tex_ref, p_min, p_max, uv_min, uv_max, col); } +inline void ImDrawList::AddImageQuad(ImTextureRef tex_ref, const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& uv1, const ImVec2& uv2, const ImVec2& uv3, const ImVec2& uv4, ImU32 col) { imgui_function_table_instance()->ImDrawList_AddImageQuad(this, tex_ref, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); } +inline void ImDrawList::AddImageRounded(ImTextureRef tex_ref, const ImVec2& p_min, const ImVec2& p_max, const ImVec2& uv_min, const ImVec2& uv_max, ImU32 col, float rounding, ImDrawFlags flags) { imgui_function_table_instance()->ImDrawList_AddImageRounded(this, tex_ref, p_min, p_max, uv_min, uv_max, col, rounding, flags); } inline void ImDrawList::PathArcTo(const ImVec2& center, float radius, float a_min, float a_max, int num_segments) { imgui_function_table_instance()->ImDrawList_PathArcTo(this, center, radius, a_min, a_max, num_segments); } inline void ImDrawList::PathArcToFast(const ImVec2& center, float radius, int a_min_of_12, int a_max_of_12) { imgui_function_table_instance()->ImDrawList_PathArcToFast(this, center, radius, a_min_of_12, a_max_of_12); } inline void ImDrawList::PathEllipticalArcTo(const ImVec2& center, const ImVec2& radius, float rot, float a_min, float a_max, int num_segments) { imgui_function_table_instance()->ImDrawList_PathEllipticalArcTo(this, center, radius, rot, a_min, a_max, num_segments); } @@ -891,12 +886,7 @@ inline void ImDrawList::PrimRectUV(const ImVec2& a, const ImVec2& b, const ImVec inline void ImDrawList::PrimQuadUV(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& d, const ImVec2& uv_a, const ImVec2& uv_b, const ImVec2& uv_c, const ImVec2& uv_d, ImU32 col) { imgui_function_table_instance()->ImDrawList_PrimQuadUV(this, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); } inline ImFont::ImFont() { imgui_function_table_instance()->ConstructImFont(this); } inline ImFont::~ImFont() { imgui_function_table_instance()->DestructImFont(this); } -inline ImFontGlyph* ImFont::FindGlyph(ImWchar c) { return imgui_function_table_instance()->ImFont_FindGlyph(this, c); } -inline ImFontGlyph* ImFont::FindGlyphNoFallback(ImWchar c) { return imgui_function_table_instance()->ImFont_FindGlyphNoFallback(this, c); } -inline ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, const char* text_begin, const char* text_end, const char** remaining) { return imgui_function_table_instance()->ImFont_CalcTextSizeA(this, size, max_width, wrap_width, text_begin, text_end, remaining); } -inline const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const char* text_end, float wrap_width) { return imgui_function_table_instance()->ImFont_CalcWordWrapPositionA(this, scale, text, text_end, wrap_width); } -inline void ImFont::RenderChar(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, ImWchar c) { imgui_function_table_instance()->ImFont_RenderChar(this, draw_list, size, pos, col, c); } -inline void ImFont::RenderText(ImDrawList* draw_list, float size, const ImVec2& pos, ImU32 col, const ImVec4& clip_rect, const char* text_begin, const char* text_end, float wrap_width, bool cpu_fine_clip) { imgui_function_table_instance()->ImFont_RenderText(this, draw_list, size, pos, col, clip_rect, text_begin, text_end, wrap_width, cpu_fine_clip); } +inline bool ImFont::IsGlyphInFont(ImWchar c) { return imgui_function_table_instance()->ImFont_IsGlyphInFont(this, c); } #endif