All Projects → Rebzzel → Kiero

Rebzzel / Kiero

Licence: mit
Universal graphical hook for a D3D9-D3D12, OpenGL and Vulkan based games.

Projects that are alternatives of or similar to Kiero

Reshade
A generic post-processing injector for games and video software.
Stars: ✭ 2,285 (+510.96%)
Mutual labels:  opengl, vulkan, d3d11, d3d9, hook
Bgfx
Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
Stars: ✭ 10,252 (+2641.18%)
Mutual labels:  opengl, vulkan, d3d11, d3d9
Shaderconductor
ShaderConductor is a tool designed for cross-compiling HLSL to other shading languages
Stars: ✭ 1,146 (+206.42%)
Mutual labels:  opengl, vulkan, d3d11, d3d9
Pbr
An implementation of physically based shading & image based lighting in D3D11, D3D12, Vulkan, and OpenGL 4.
Stars: ✭ 722 (+93.05%)
Mutual labels:  opengl, vulkan, d3d11
Dxvk
Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine
Stars: ✭ 7,117 (+1802.94%)
Mutual labels:  vulkan, d3d11, d3d9
Renderdoc
RenderDoc is a stand-alone graphics debugging tool.
Stars: ✭ 5,969 (+1495.99%)
Mutual labels:  opengl, vulkan, d3d11
Pmtech
Lightweight, multi-platform, data-oriented game engine.
Stars: ✭ 478 (+27.81%)
Mutual labels:  opengl, vulkan, d3d11
Llgl
Low Level Graphics Library (LLGL) is a thin abstraction layer for the modern graphics APIs OpenGL, Direct3D, Vulkan, and Metal
Stars: ✭ 1,011 (+170.32%)
Mutual labels:  opengl, vulkan, d3d11
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-29.68%)
Mutual labels:  opengl, vulkan, d3d11
Diligentengine
A modern cross-platform low-level graphics library and rendering framework
Stars: ✭ 2,142 (+472.73%)
Mutual labels:  opengl, vulkan, d3d11
Diligentsamples
Sample projects demonstrating the usage of Diligent Engine
Stars: ✭ 138 (-63.1%)
Mutual labels:  opengl, vulkan, d3d11
Apitrace
Tools for tracing OpenGL, Direct3D, and other graphics APIs
Stars: ✭ 2,198 (+487.7%)
Mutual labels:  opengl, d3d11, d3d9
Xray 16
Improved version of the X-Ray Engine, the game engine used in the world-famous S.T.A.L.K.E.R. game series by GSC Game World. Join OpenXRay! ;)
Stars: ✭ 1,806 (+382.89%)
Mutual labels:  opengl, d3d11, d3d9
Gpu performance api
GPU Performance API for AMD GPUs
Stars: ✭ 170 (-54.55%)
Mutual labels:  opengl, vulkan, d3d11
Saba
OpenGL Viewer (OBJ PMD PMX)
Stars: ✭ 208 (-44.39%)
Mutual labels:  opengl, vulkan, d3d11
ocat
The Open Capture and Analytics Tool (OCAT) provides an FPS overlay and performance measurement for D3D11, D3D12, and Vulkan
Stars: ✭ 233 (-37.7%)
Mutual labels:  vulkan, d3d11
Gameoverlay
🎮 GameOverlay using CEF with support for common rendering backends
Stars: ✭ 32 (-91.44%)
Mutual labels:  hook, opengl
d3d9-to-11
Direct3D 9 to Direct3D 11 converter
Stars: ✭ 69 (-81.55%)
Mutual labels:  d3d11, d3d9
Urde
Data interchange and engine re-implementation for games by Retro Studios | Mirror
Stars: ✭ 253 (-32.35%)
Mutual labels:  opengl, vulkan
D3d8to9
A D3D8 pseudo-driver which converts API calls and bytecode shaders to equivalent D3D9 ones.
Stars: ✭ 419 (+12.03%)
Mutual labels:  hook, d3d9

kiero


Universal graphical hook for a D3D9-D3D12, OpenGL and Vulcan based games

Requirement

Windows SDK (For D3D9/D3D10/D3D11/OpenGL hook)

DirectX SDK (For D3D9/D3D10/D3D11 hook)

Vulkan SDK (For Vulkan hook)

MinHook (For kiero::bind function)

Example

To start, go to the kiero.h and select the desired hooks

// Example for D3D9 hook
#define KIERO_INCLUDE_D3D9   1 // 1 if you need D3D9 hook
#define KIERO_INCLUDE_D3D10  0 // 1 if you need D3D10 hook
#define KIERO_INCLUDE_D3D11  0 // 1 if you need D3D11 hook
#define KIERO_INCLUDE_D3D12  0 // 1 if you need D3D12 hook
#define KIERO_INCLUDE_OPENGL 0 // 1 if you need OpenGL hook
#define KIERO_INCLUDE_VULKAN 0 // 1 if you need Vulkan hook

Then proceed to the main work

// Example for D3D9 hook

// Include required libraries
#include "kiero.h"
#include <d3d9.h>
#include <Windows.h>

// Create the type of function that we will hook
typedef long(__stdcall* EndScene)(LPDIRECT3DDEVICE9);
static EndScene oEndScene = NULL;

// Declare the detour function
long __stdcall hkEndScene(LPDIRECT3DDEVICE9 pDevice)
{
  // ... Your magic here ...
  
  // static bool init = false;
  // if (!init)
  // {
  //  MessageBox(0, "Boom! It's works!", "Kiero", MB_OK);
  //  init = true;
  // }
  
  return oEndScene(pDevice);
}

int kieroExampleThread()
{
  if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)
  // or
  if (kiero::init(kiero::RenderType::Auto) == kiero::Status::Success)
  {
    // define KIERO_USE_MINHOOK must be 1
    // the index of the required function can be found in the METHODSTABLE.txt
    kiero::bind(42, (void**)&oEndScene, hkEndScene);
    
    // If you just need to get the function address you can use the kiero::getMethodsTable function
    oEndScene = (EndScene)kiero::getMethodsTable()[42];
  }

  return 0;
}

BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID)
{
  DisableThreadLibraryCalls(hInstance);

  switch (fdwReason)
  {
    case DLL_PROCESS_ATTACH:
      CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)kieroExampleThread, NULL, 0, NULL);
      break;
  }

  return TRUE;
}

License

MIT License

Copyright (c) 2014-2021 Rebzzel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].