Members - Reputation: 108
Posted 02 March 2012 - 02:05 PM
How can I get, say, projection matrix, from the current D3D9 context? By current I mean from a certain game, to which I am hooked through a DLL. Such thing is done i.e. in ENB Series, as far as I know.
Pray & code
Members - Reputation: 1229
Posted 03 March 2012 - 09:19 AM
Crossbones+ - Reputation: 5929
Posted 03 March 2012 - 10:51 AM
With the programmable pipeline there is no concept of "state" for many things; even a matrix could come from many different souces: it could be passed along with other vertex attributes, constructed on the fly in a shader, or any number of other ways. TextureStageState doesn't exist and Sampler State could be set via an Effect rather than SetSamplerState calls.
One thing you could do - if you know that the program uses Effects - is create an ID3DXEffectStateManager and use that to capture settings. But you'll never really get the full picture with a program using shaders.
It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.