Advertisement

Getting World Vertices in DX7 IM

Started by February 08, 2000 07:28 AM
1 comment, last by Jaxxom 25 years, 1 month ago
How can I obtain vertices in world coordinates in DirectX7 Immediate Mode? I have model/local coordinate models, and can render them fine, but how can I actually convert these models to world coordinates so I can collision detect them...? In my old ''did-it-myself'' engine I used to transform everything to world coordinates by hand, collision detect then render by transforming again to view coordinates (and converting to screen coords). However, with DX I can''t figure out how to do it. Do I have to transform the objects myself by hand from the models...? Any help from anyone would be greatly appreciated... thanks Jaxxom
Jaxxom
Yeah, there is no way to read your post-transform vertices. This causes problems on HW TnL device.

You should probably transform by hand (or using D3DXMATRIX) with low poly versions of your models.
Advertisement
With vertex buffers you can get the transformed coordinates, if you specify that the buffer is stored in system memory. Then you can use Process() to transform vertices and the lock the buffer to get the coordinates.

As stated by mhkrause, you cannot get transformed vertices from your card. But with Process() (or is it ProcessVertices()) you at least get to use the driver''s optimizations for transforming. Usually this means that it''s optimized to handle AMD and Intel specific code.

Read these for more info on vertex buffers:

Optimizing Direct3D for the Geforce256
DirectX Developer FAQ

This topic is closed to new replies.

Advertisement