Skip to main content
GameDev.net gamedev.net
🔒 Locked

Transform & Lightning

Started by Zombie Jul 9, 2000 at 5:13 AM 8 replies 300+ views
Original Post
Zombie
Zombie
Could someone explain (make it short) how can I use T&L in my DirectX game using hardware? How about software then?
Zombie
Zombie
"You want to use hardware T&L in software mode? Hmmmm "
No I just wanted to know how to use T&L in hardware & software modes, and I noticed too that software is obvious .
But my question was, can I use T&L directly from DX, and if not DX, from what api then?

Mr Cucumber
Mr Cucumber
If you wan''t to use Hardware T&L you create a device with this guid: IID_IDirect3DTnLHALDevice.
Ofcourse you can''t use a vertex type with the D3DFVF_XYZRHW flag since that means you do the transformations yourself.

Unless you create hardware T&L device the transformation is handled in software always. But you have the option of letting Direct3D handle it for you if you don''t wan''t to do it yourself.
benjamin bunny
benjamin bunny
quote:
Original post by Zombie
But my question was, can I use T&L directly from DX, and if not DX, from what api then?


Not intending to start a flame war or anything, but if you use openGL, hardware T&L is automatically used if supported by the card, with no extra code.



http://www.geocities.com/ben32768
kadaf
kadaf
quote:
"but if you use openGL, hardware T&L is automatically used if supported by the card, with no extra code"

EXACLY and that is one of the reasons to use GL..
ok it is also easy to do T&L in D3D, but it requires some extra code..

take a look at the examples shipped with the DX7SDK...

bye

-----------------------
Rasmus Neckelmann
phudze.cjb.net
-- Rasmus Neckelmann
mhkrause
mhkrause
But that''s because an OpenGL ICD must implement the full transform and lighting pipeline.

With D3D, software TnL isn''t handle by the driver, it''s handled by the D3D frontend.

So if I have a PIII and an optimized vertex buffer, I know that my SW TnL is going through a pipeline optimized for the PIII SSE instructions. Same for 3DNow!.

If it were handled by the driver . . . it might be going through an processor-specific optimized pipeline, it may not.
benjamin bunny
benjamin bunny
That's not a problem if you have a nVidia card - their latest drivers have are fully optimised for 3Dnow! and SSE. Unfortunately however, nVidia are one of but a few manufacturers who write decent openGL drivers.

Personally I'm hoping that the crap companies (such as 3dfx) who've never bothered to write proper openGL drivers will just go out of business - and the market seems to be going that way at the moment.

http://www.geocities.com/ben32768

Edited by - benjamin bunny on July 11, 2000 9:44:45 PM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.