-
D3DDetour
Basicly, I was dumb, and I ended up writing code to detour EndScene/Present in all the 3 DirectX versions. It's very simple, as you can see in the source code.
There are probably tons of ways you could have done this otherwise, without dependencies etc. but here it is anyways:
GitHub D3DDetour
You need SlimDX (.NET 4.0 version) and WhiteMagic by Apoc.
Based on this.
-
Post Thanks / Like - 1 Thanks
tutrakan (1 members gave Thanks to miceiken for this useful post)
-
Active Member
Nice and simple, good share.
-
Member
When I try to compile in visual studio 2010 it says:
Error 1 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D9.cs 28 39 D3DDetour
Error 2 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D9.cs 29 36 D3DDetour
Error 3 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D9.cs 34 33 D3DDetour
Error 4 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D9.cs 35 29 D3DDetour
Error 5 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D10.cs 44 46 D3DDetour
Error 6 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D10.cs 45 50 D3DDetour
Error 7 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D11.cs 48 46 D3DDetour
Error 8 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D11.cs 49 50 D3DDetour
Error 9 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D10.cs 51 32 D3DDetour
Error 10 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D10.cs 52 28 D3DDetour
Error 11 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D11.cs 55 32 D3DDetour
Error 12 The name 'Core' does not exist in the current context C:\miceiken-D3DDetour-0725077\D3D11.cs 56 28 D3DDetour
-
Active Member
First, you doing it wrong, and second, gtfo.
-
It kind of requires you to change some code, you need to add WhiteMagic to your project. The Core.cs file is just
Code:
using WhiteMagic;
namespace D3DDetour
{
public static class Core
{
public static readonly Magic Magic = new Magic();
}
}
-
Member
Originally Posted by
miceiken
It kind of requires you to change some code, you need to add WhiteMagic to your project. The Core.cs file is just
Code:
using WhiteMagic;
namespace D3DDetour
{
public static class Core
{
public static readonly Magic Magic = new Magic();
}
}
thank you. I did have the whitemagic/slimdx references added. i was just missing the core.cs.
i just started learning and i appreciate your help and contributions.
-
I should have packed it up as a class library instead, but I was in a hurry to get to bed, and I assumed people could figure it out
EDIT:
I updated the code now, added a more clear example and I made it a class library.
Last edited by miceiken; 12-20-2011 at 03:08 PM.