hudhook
0.8.0
Dear ImGui 오버레이를 구축하기 위한 Rust 렌더러 후크 라이브러리입니다.
현재 DirectX 9, DirectX 11, DirectX 12 및 OpenGL 3을 지원합니다. Windows 및 Wine/Proton에서 실행됩니다.
hudhook
좋아하고 프로젝트를 지원하고 싶다면 내 Patreon을 통해 지원하실 수 있습니다.
이 프로젝트가 귀하에게 도움이 되어 기쁘고 귀하의 지원에 감사드립니다. 감사합니다!
// src/lib.rs
use hudhook :: * ;
pub struct MyRenderLoop ;
impl ImguiRenderLoop for MyRenderLoop {
fn render ( & mut self , ui : & mut imgui :: Ui ) {
ui . window ( "My first render loop" )
. position ( [ 0. , 0. ] , imgui :: Condition :: FirstUseEver )
. size ( [ 320. , 200. ] , imgui :: Condition :: FirstUseEver )
. build ( || {
ui . text ( "Hello, hello!" ) ;
} ) ;
}
}
{
// Use this if hooking into a DirectX 9 application.
use hudhook :: hooks :: dx9 :: ImguiDx9Hooks ;
hudhook ! ( ImguiDx9Hooks , MyRenderLoop ) ;
}
{
// Use this if hooking into a DirectX 11 application.
use hudhook :: hooks :: dx11 :: ImguiDx11Hooks ;
hudhook ! ( ImguiDx11Hooks , MyRenderLoop ) ;
}
{
// Use this if hooking into a DirectX 12 application.
use hudhook :: hooks :: dx12 :: ImguiDx12Hooks ;
hudhook ! ( ImguiDx12Hooks , MyRenderLoop ) ;
}
{
// Use this if hooking into an OpenGL 3 application.
use hudhook :: hooks :: opengl3 :: ImguiOpenGl3Hooks ;
hudhook ! ( ImguiOpenGl3Hooks , MyRenderLoop ) ;
}
// src/main.rs
use hudhook :: inject :: Process ;
fn main ( ) {
let mut cur_exe = std :: env :: current_exe ( ) . unwrap ( ) ;
cur_exe . push ( ".." ) ;
cur_exe . push ( "libmyhook.dll" ) ;
let cur_dll = cur_exe . canonicalize ( ) . unwrap ( ) ;
Process :: by_name ( "MyTargetApplication.exe" ) . unwrap ( ) . inject ( cur_dll ) . unwrap ( ) ;
}