Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Question about transformed vertices in directx8

This topic is 6124 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to get transformed vertices from the d3d device? I''d like to use transformed vertices for working out collision.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster
I''ll go into a bit more detail...

I''ve drawn meshes using the DrawSubset command. I assume that once this is done a copy of the mesh is saved by the d3d device in the form of a vertex buffer (or something similar) and that the mesh is saved in it''s transformed state, is this right? If it is, and assuming the d3d device is still kept in the same state, how do I get the transformed mesh from the d3d device. I''ve tried a few things, but I''m really unsure what procedure to use. I''ve been trying to read out a vertex buffer from the device but don''t seem to be getting any results. If anyone knows what I should be doing a quick pointer would be greatly appreciated.

Share this post

Link to post
Share on other sites
Guest Anonymous Poster

ive never really used meshes before, but from a quick look this is how i would go about it:

-Get the vertex buffer pointer of the mesh,

-have another dynamic vert buffer for transformed verts. (in SYSMEM ''cos you''ll be doing alot of buffer reads)

-transform the mesh verts into the dynamic buffer.

-use the dynamic buffer to get the transformed verts and do collision.

-render the mesh.

now, rendering the mesh can either be done the usual way or rendered from the dynamic buffer, you should test it.

rendering from the mesh means the verts have to be transformed again, but this wouldn''t take that long. (esp w/ hardware)

rendering from the dynamic buffer means that you''re rendering from non optimal video memory.

there are also other possibilities, but it all depends on how many transformed faces you need etc.

have fun, hope this helps



Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!