Jump to content
  • Advertisement


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


Using other 3D files then .x

This topic is 5299 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

Anyone know how to use a .map or even Halflifes type .bsp for a map and still be able to use D3DXIntersect? Or a program like HalfLife''s Hammer Editor to make a map?

Share this post

Link to post
Share on other sites
To use formats other than .x files, you''ll either need to write your own model loader or find a library on the net that loads the data for you into some array. You can then take all that data and copy it into vertex/index buffers to use when rendering.

As far as being able to use D3DXIntersect, unfortunately, this funciton requires the mesh data to be in an instance of ID3DXMesh. One way to be able to use D3DXIntersect is to load the model into some array and then create an object of type ID3DXMesh and fill in all the appropriate data. This includes things like vertex/index buffers, adjacency info, etc... You can then use D3DXIntersect with no problem.

Whether it''s worth going through all that work is up to you. Writing a ray-triangle intersection method isn''t all that hard and there are plenty of examples on the web anyway.


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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!