dxgi.dll funny

Published: (February 20, 2026 at 08:35 PM EST)
2 min read
Source: Dev.to

Source: Dev.to

Cover image for dxgi.dll funny

Requirements

  • Download ReShade from the official repository (GitHub)
  • Visual Studio 2022+
  • D3D9 SDK

1. Open the ReShade solution

  1. Download reshade-master and open the solution in Visual Studio (usually reshade.sln).

2. Add the ESP files

You need six files for the ESP implementation:

  • esp.hpp
  • types.h
  • class.h
  • functions.hpp
  • xor_func.hpp
  • xor_string.hpp

(The files are too large to paste here; add them to the project manually.)

3. Hook the ESP into ReShade

Modify runtime_gui.cpp

  1. Include the ESP header at the top:
#include "esp.hpp"
  1. Locate the init_gui function and add the ESP initialization after ImGui::CreateContext():
void reshade::runtime::init_gui()
{
    _imgui_context = ImGui::CreateContext();

    init(); // add init here

    ImGui::SetCurrentContext(nullptr);
}
  1. Find the draw_gui function, locate the call to ImGui::NewFrame(); and invoke the ESP tick function right after it:
ImGui::NewFrame();
tickkkk();   // call ESP each frame

Add a toggle button

  1. Open runtime.hpp and declare a boolean to control the ESP:
bool _esp_bool = false;

It can be placed near the other overlay settings, e.g.:

#pragma endregion

#pragma region Overlay Add-ons
char _addons_filter[32] = {};
#pragma endregion

bool _esp_bool = false;

#pragma region Overlay Settings
int _font_size = 13;
  1. In runtime_gui.cpp, find draw_gui_home and add a button to toggle the ESP:
if (ImGui::Button("ESP")) {
    _esp_bool = !_esp_bool;
}

4. Build the project

Compile the solution using Release x64 configuration. If you encounter compilation errors, search online for fixes.

5. Deploy

Copy the resulting dxgi.dll into your FiveM folder just like a normal ReShade installation.

Notes

  • The provided code works on GPU model 2060 only; you’ll need to adjust jump offsets for other versions using an offset dumper.
  • Repository with the full source:
0 views
Back to Blog

Related posts

Read more »