DirectX again
by Robert Stewart · in Torque Game Engine Advanced · 10/15/2005 (11:26 am) · 4 replies
So if I had something code like this in TSE
D3DXMatrixTranslation(&mTrans,-200,-55,150);Would that work? I'm still a little curios as to how TSE handles DirectX. If that did work, then when TSE works on Linux and Mac, this code would stop working right? So would that code still work for the Windows user? and have OpeGL code for the Linux and Mac.
About the author
#2
10/15/2005 (5:23 pm)
I was just wondering, because I have some code from DirectX I would rather not re-write. So I could in theory use the DX code for Windows, and OpenGl code for the Mac/Linux users.
#3
You're a LOT better off porting to GFX. If you have to use D3D directly, be very careful how you do it, and be aware you're really working counter to a lof of how the code is structured.
So.. yeah, you could do it, but it's not an idea I'd suggest.
10/15/2005 (11:50 pm)
You could but it's going to break a lot of the GFX layer (ie, state caching will give VERY ODD results).You're a LOT better off porting to GFX. If you have to use D3D directly, be very careful how you do it, and be aware you're really working counter to a lof of how the code is structured.
So.. yeah, you could do it, but it's not an idea I'd suggest.
#4
10/16/2005 (9:19 am)
Ok, thanks for the suggestions. I will port the code over to GFX then.
Associate Matt Fairfax
PopCap