C# Direct3D9 EndScene Hook Rendering
Hey,
I'm trying to draw text on the screen of a direct3d9 game using an EndScene() hook!
I've set it up and I can log debug messages in my hook but drawing something simply doesn't work.
I'm probably just stupid but I would appreciate it if you could tell me what I am doing wrong
Thank you
I'm trying to draw text on the screen of a direct3d9 game using an EndScene() hook!
I've set it up and I can log debug messages in my hook but drawing something simply doesn't work.
Code:
public int EndSceneHook(IntPtr Direct3dDevice)
{
using (Device device = Device.FromPointer(Direct3dDevice))
{
try
{
Font text = new Font(device, font);
text.DrawString(null, "HELLO", 100, 100, (Color4) 0xFFFF00);
text.Dispose();
}
catch(Exception e)
{
MessageBox.Show("Exception " + e.Message);
}
return device.EndScene().Code;
}
}
Thank you
