mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 13:05:25 -05:00
Add support for custom providers via plugins
This commit is contained in:
18
plugins/libimhex/include/plugin.hpp
Normal file
18
plugins/libimhex/include/plugin.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <imgui.h>
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <views/view.hpp>
|
||||
#include <providers/provider.hpp>
|
||||
|
||||
#define IMHEX_PLUGIN namespace hex::plugin::internal { \
|
||||
void initializePlugin(ImGuiContext *ctx, hex::prv::Provider **provider) { \
|
||||
if (glGetString == NULL) \
|
||||
gladLoadGL(); \
|
||||
ImGui::SetCurrentContext(ctx); \
|
||||
hex::prv::Provider::setProviderStorage(*provider); \
|
||||
} \
|
||||
} \
|
||||
namespace hex::plugin
|
||||
Reference in New Issue
Block a user