отрисовываю imgui в endscenehook
long __stdcall EndSceneHook(IDirect3DDevice9* device)
{
static const auto returnAddress = _ReturnAddress();
const auto result = EndSceneOriginal(device, device);
if (_ReturnAddress() == returnAddress)
return result;
if (!gui::setup)...