subproject: implot

pull/1136/head
FlightlessMango 7 months ago
parent 801f02412c
commit 84caba707a

1
.gitignore vendored

@ -42,6 +42,7 @@ subprojects/Vulkan-Headers-*/
subprojects/imgui-*/
subprojects/spdlog-*/
subprojects/nlohmann_json-*/
subprojects/implot-*/
#GNU Global Metadata
**/GPATH

@ -215,6 +215,18 @@ endif
dearimgui_sp = subproject('imgui', default_options: imgui_options)
dearimgui_dep = dearimgui_sp.get_variable('imgui_dep')
if is_unixy
implot_sp = subproject('implot')
implot_dep = implot_sp.get_variable('implot_dep')
implot_lib = static_library(
'implot_static',
objects: implot_sp.get_variable('implot_lib').extract_all_objects()
)
else
implot_dep = null_dep
implot_lib = static_library('nulllib', [])
endif
spdlog_dep = cpp.find_library('spdlog', required: get_option('use_system_spdlog'))
if not spdlog_dep.found()
spdlog_sp = subproject('spdlog', default_options: [

@ -19,6 +19,9 @@
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "amdgpu.h"
#ifdef __linux__
#include "implot.h"
#endif
#define GLFW_EXPOSE_NATIVE_X11
#include <GLFW/glfw3native.h>
@ -221,6 +224,9 @@ static GLFWwindow* init(const char* glsl_version){
glfwMakeContextCurrent(window);
glfwSwapInterval(1); // Enable vsync
ImGui::CreateContext();
#ifdef __linux__
ImPlot::CreateContext();
#endif
ImGuiIO& io = ImGui::GetIO(); (void)io;
io.IniFilename = NULL;
ImGui::StyleColorsDark();

@ -8,6 +8,9 @@
#include <unistd.h>
#include <spdlog/spdlog.h>
#include <imgui.h>
#ifdef __linux__
#include <implot.h>
#endif
#include "gl_hud.h"
#include "file_utils.h"
#include "notify.h"
@ -152,6 +155,9 @@ void imgui_create(void *ctx, const gl_wsi plat)
IMGUI_CHECKVERSION();
ImGuiContext *saved_ctx = ImGui::GetCurrentContext();
state.imgui_ctx = ImGui::CreateContext();
#ifdef __linux__
ImPlot::CreateContext();
#endif
ImGuiIO& io = ImGui::GetIO(); (void)io;
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
//io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls

@ -174,9 +174,11 @@ mangohud_static_lib = static_library(
dep_pthread,
dep_vulkan,
windows_deps,
json_dep],
json_dep,
implot_dep],
include_directories : [inc_common],
link_args : link_args,
link_with : implot_lib,
install_dir : libdir_mangohud,
install : false
)
@ -215,9 +217,11 @@ mangohud_opengl_shared_lib = shared_library(
dep_pthread,
dep_vulkan,
windows_deps,
json_dep],
json_dep,
implot_dep],
include_directories : [inc_common],
link_args : link_args,
link_with: mangohud_static_lib,
install_dir : libdir_mangohud,
install: true
)
@ -240,6 +244,7 @@ if is_unixy
dependencies : [dep_dl],
include_directories : [inc_common],
link_args : link_args,
link_with: mangohud_static_lib,
install_dir : libdir_mangohud,
install : true
)
@ -270,6 +275,8 @@ if get_option('mangoapp')
dep_x11,
glfw3_dep,
json_dep,
glew_dep,
implot_dep
],
include_directories : [inc_common],
install_tag : 'mangoapp',

@ -50,6 +50,9 @@
#include "notify.h"
#include "blacklist.h"
#include "pci_ids.h"
#ifdef __linux__
#include "implot.h"
#endif
using namespace std;
@ -1310,6 +1313,9 @@ static void setup_swapchain_data(struct swapchain_data *data,
data->format = pCreateInfo->imageFormat;
data->imgui_context = ImGui::CreateContext(data->font_atlas);
#ifdef __linux__
ImPlot::CreateContext();
#endif
ImGui::SetCurrentContext(data->imgui_context);
ImGui::GetIO().IniFilename = NULL;

@ -0,0 +1,13 @@
[wrap-file]
directory = implot-0.16
source_url = https://github.com/epezent/implot/archive/refs/tags/v0.16.zip
source_filename = implot-0.16.zip
source_hash = 24f772c688f6b8a6e19d7efc10e4923a04a915f13d487b08b83553aa62ae1708
patch_filename = implot_0.16-1_patch.zip
patch_url = https://wrapdb.mesonbuild.com/v2/implot_0.16-1/get_patch
patch_hash = 1c6b1462066a5452fa50c1da1dd47fed841f28232972c82d778f2962936568c7
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/implot_0.16-1/implot-0.16.zip
wrapdb_version = 0.16-1
[provide]
implot = implot_dep
Loading…
Cancel
Save