Update to imgui-1.87

imgui-1.87
jackun 2 years ago
parent 421ca3b57b
commit 3da0f7bf24
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -226,12 +226,13 @@ imgui_options = [
'dx12=disabled',
'metal=disabled',
'opengl=disabled',
'sdl_renderer=disabled',
'vulkan=disabled',
'webgpu=disabled',
'glfw=disabled',
'sdl2=disabled',
'osx=disabled',
'win=disabled',
'marmalade=disabled',
'allegro5=disabled',
]

@ -12,7 +12,7 @@
#include "../overlay.h"
#include "notify.h"
#include "mangoapp.h"
#include <GL/glew.h>
#include "glad/glad.h"
#include <GLFW/glfw3.h>
#define GLFW_EXPOSE_NATIVE_X11
@ -255,10 +255,7 @@ int main(int, char**)
Window x11_window = glfwGetX11Window(window);
Atom overlay_atom = XInternAtom (x11_display, GamescopeOverlayProperty, False);
// Initialize OpenGL loader
bool err = glewInit() != GLEW_OK;
if (err)
if (!gladLoadGL())
{
fprintf(stderr, "Failed to initialize OpenGL loader!\n");
return 1;

@ -829,7 +829,7 @@ void HudElements::gamescope_frame_timing(){
ImGui::PlotLines("", gamescope_debug_app.data(),
gamescope_debug_app.size(), 0,
NULL, min_time, max_time,
ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns - 30, 50));
ImVec2(ImGui::GetContentRegionAvail().x * HUDElements.params->table_columns - 30, 50));
ImGui::SameLine();
ImGui::PushFont(HUDElements.sw_stats->font1);
ImGui::Text("%.1fms", gamescope_debug_app.back());
@ -854,7 +854,7 @@ void HudElements::gamescope_frame_timing(){
ImGui::PlotLines("", gamescope_debug_latency.data(),
gamescope_debug_latency.size(), 0,
NULL, min_time, max_time,
ImVec2(ImGui::GetContentRegionAvailWidth() * HUDElements.params->table_columns - 30, 50));
ImVec2(ImGui::GetContentRegionAvail().x * HUDElements.params->table_columns - 30, 50));
ImGui::SameLine();
ImGui::PushFont(HUDElements.sw_stats->font1);
ImGui::Text("%.1fms", gamescope_debug_latency.back());

@ -51,7 +51,6 @@ vklayer_files = files(
'logging.cpp',
'config.cpp',
'gpu.cpp',
'vulkan.cpp',
'blacklist.cpp',
'file_utils.cpp',
'amdgpu.cpp',
@ -154,7 +153,7 @@ if is_unixy
endif
endif
link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL', '-lGL'])
link_args = cc.get_supported_link_arguments(['-Wl,-Bsymbolic-functions', '-Wl,-z,relro', '-Wl,--exclude-libs,ALL'])
# meson fails to check version-script so just force add
link_args += '-Wl,--version-script,@0@'.format(join_paths(meson.current_source_dir(), 'mangohud.version'))
@ -163,6 +162,7 @@ vklayer_mesa_overlay = shared_library(
mangohud_version,
util_files,
vk_enum_to_str,
files('vulkan.cpp'),
vklayer_files,
opengl_files,
overlay_spv,
@ -216,7 +216,6 @@ if is_unixy
endif
if get_option('mangoapp') and sizeof_ptr == 8
pre_args += '-DIMGUI_IMPL_OPENGL_LOADER_GLEW'
pre_args += '-DMANGOAPP'
mangoapp = executable(
'mangoapp',
@ -224,9 +223,9 @@ if get_option('mangoapp') and sizeof_ptr == 8
util_files,
vk_enum_to_str,
vklayer_files,
opengl_files,
files(
'app/main.cpp',
'gl/glad.c',
),
c_args : [
pre_args,

@ -523,9 +523,9 @@ static void render_benchmark(swapchain_stats& data, const struct overlay_params&
ImGui::PushStyleColor(ImGuiCol_FrameBg, ImVec4(0.0, 0.0, 0.0, alpha / params.background_alpha));
ImGui::Dummy(ImVec2(0.0f, 8.0f));
if (params.enabled[OVERLAY_PARAM_ENABLED_histogram])
ImGui::PlotHistogram("", benchmark.fps_data.data(), benchmark.fps_data.size(), 0, "", 0.0f, max + 10, ImVec2(ImGui::GetContentRegionAvailWidth(), 50));
ImGui::PlotHistogram("", benchmark.fps_data.data(), benchmark.fps_data.size(), 0, "", 0.0f, max + 10, ImVec2(ImGui::GetContentRegionAvail().x, 50));
else
ImGui::PlotLines("", benchmark.fps_data.data(), benchmark.fps_data.size(), 0, "", 0.0f, max + 10, ImVec2(ImGui::GetContentRegionAvailWidth(), 50));
ImGui::PlotLines("", benchmark.fps_data.data(), benchmark.fps_data.size(), 0, "", 0.0f, max + 10, ImVec2(ImGui::GetContentRegionAvail().x, 50));
ImGui::PopStyleColor(2);
ImGui::End();
}

@ -1,11 +1,12 @@
[wrap-file]
directory = imgui-1.81
source_url = https://github.com/ocornut/imgui/archive/v1.81.tar.gz
source_filename = imgui-1.81.tar.gz
source_hash = f7c619e03a06c0f25e8f47262dbc32d61fd033d2c91796812bf0f8c94fca78fb
patch_url = https://wrapdb.mesonbuild.com/v2/imgui_1.81-1/get_patch
patch_filename = imgui-1.81-1-wrap.zip
patch_hash = 6d00b442690b6a5c5d8f898311daafbce16d370cf64f53294c3b8c5c661e435f
directory = imgui-1.87
source_url = https://github.com/ocornut/imgui/archive/refs/tags/v1.87.tar.gz
source_filename = imgui-1.87.tar.gz
source_hash = b54ceb35bda38766e36b87c25edf7a1cd8fd2cb8c485b245aedca6fb85645a20
patch_filename = imgui_1.87-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/imgui_1.87-1/get_patch
patch_hash = 28a90b96661a778f26db07f2c51294a037fb85843beab430defbddfd2e03a396
[provide]
imgui = imgui_dep

Loading…
Cancel
Save