Jump to content
  • Advertisement
Sign in to follow this  
spooky_paul

PhysX and DirectX

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

Advertisement
Thanks for the link, but most of api has changed since the example was written and it wont compile with the latest sdk. Is there any newer one out there?

Share this post


Link to post
Share on other sites
I had the same problem as you. I needed some info on DX an PhysX, cause the docs in the SDK are most for OGL. I found this example and used also the docs of PhysX. Now PhysX works well with DX in my app.

Share this post


Link to post
Share on other sites
If you don't mind using DirectX through a 3rd party graphics engine, then I can vouch for a setup that works:

Ogre3D + PhysX.

There's a wrapper which makes things really really simple. I used it myself and it works most splendidly.

Share this post


Link to post
Share on other sites
Quote:
Original post by NQ
If you don't mind using DirectX through a 3rd party graphics engine, then I can vouch for a setup that works:

Ogre3D + PhysX.

There's a wrapper which makes things really really simple. I used it myself and it works most splendidly.


Actually this is how i started. ogre3d + nxogre. But now i feet that the time came to move on. This is why i want this DX + PhysX example

Share this post


Link to post
Share on other sites
I'm not sure I fully understand what the problem is. PhysX is your Physics API, DirectX is your graphics & potentially input/sound API. It's a really straight forward integration:

1) read the PhysX SDK docs so you understand how to set up your simultation
2) learn to use DirectX for rendering

Now all you do is render your objects where PhysX says they are: you can query any physics object's orientation & translation and any other physics parameter that might influence your rendering. You also get hooks for things like OnCollide, etc so you can implement trigger and hit reactions and such.

There's no "standard" way to integrate the two systems because that's entirely up to the specific architecture of your game. Your game logic is a separate system from the physics or the rendering but it will essentially play the middle man between the two. How it middle-mans is really up to you.

There really won't be any direct communication between the physics and the rendering so in a sense there's nothing to integrate. It's really 2 separate questions:

1) how do i integrate PhysX into my game
2) how do i use DirectX in my game

-me

Share this post


Link to post
Share on other sites
Quote:
Original post by spooky_paul
I know the principles of working with them together. What I need is an example. A simple app that uses the two.


You don't actually need it; and I'm not sure a good example exists for something that specific.

The docs in the PhysX SDK should provide enough information for you to get the simulation running. There are plenty of tutorials for getting DirectX running. After that it's really just an exercise in logic (i.e. do you understand / can you figure out how to make a game engine).

I'm really not trying to be an ass, it's just once you get to the point where you're programming on a sufficiently advanced level there aren't tutorials to walk you through things anymore. You need to start learning how to design a system without copy/pasting someone else's code.

-me

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!