Advertisement

how to get world matrix in d3d9

Started by August 16, 2019 07:54 AM
4 comments, last by upxvk 5 years ago

	D3DXMATRIX m_World;
	g_pDevice->GetTransform(D3DTS_WORLD , &m_World);

i already use it , but it doesn't seem to be correct.

any guys can help me, thanks 

I haven't used D3D in a long time, so I probably can't help, but some more information might be useful. What does the function return? (Should be D3D_OK or D3DERR_INVALIDCALL.) In what way does the result not seem to be correct? You might also check the documentation, as it discusses some constraints/limitations.

Advertisement

Hi. Can you share what you’re trying to achieve? Is this fixed function pipeline, without shaders?

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

From the official docs:

This method will not return device state for a device that is created using D3DCREATE_PUREDEVICE. If you want to use this method, you must create your device with any of the other flag values in D3DCREATE.

 

Can't you simply cache the value yourself on every SetTransform call?

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

On 8/17/2019 at 11:12 AM, Endurion said:

From the official docs:

This method will not return device state for a device that is created using D3DCREATE_PUREDEVICE. If you want to use this method, you must create your device with any of the other flag values in D3DCREATE.

 

Can't you simply cache the value yourself on every SetTransform call?

That's a good idea, thanks

This topic is closed to new replies.

Advertisement