Skip to content

Commit e2a3752

Browse files
Update README.md.
1 parent 6c8b3d0 commit e2a3752

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,16 @@ extern "C"
110110

111111
void __declspec(dllexport) PostInit() {}
112112

113-
void __declspec(dllexport) OnFrame() {}
113+
void __declspec(dllexport) D3DInit(IDXGISwapChain* swapChain, ID3D11Device* device, ID3D11DeviceContext* deviceContext) {}
114+
115+
void __declspec(dllexport) OnFrame(IDXGISwapChain* swapChain) {}
114116
}
115117
```
116118

117119
* **PreInit** is called before any of the game's global variables are initialized. You only need to use this if you want to hook into C++ static initializers.
118120
* **Init** is called after the game's global variables are initialized. This is likely going to be the function where you initialize your mod and inject code. You cannot hook into C++ static initializers from this function as they have been called already.
119-
* **PostInit** is called after every DLL mod is initialized. This is a pretty niche use case and you probably won't need it.
121+
* **PostInit** is called after every DLL mod is initialized. This is a pretty niche use case and you probably won't need it.
122+
* **D3DInit** is called in **D3D11CreateDeviceAndSwapChain** after the device gets initialized. You could use this (along with **OnFrame**) to hook ImGui into the game.
120123
* **OnFrame** is called before the game's frame is presented to the screen. You can use this to execute logic per frame.
121124

122125
You can omit functions that you don't need to use. They are not required to be declared.

0 commit comments

Comments
 (0)