Jump to content
  • Advertisement
Sign in to follow this  
AnRy

D3DXCreateBox

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

I just want to know how to use the function (D3DXCreateBox) to create a cube,please give the code.

Share this post


Link to post
Share on other sites
Advertisement
Hey bud,

First of all, that isn't the politest way to ask for help on something. People here won't just hand over code. I would suggest that you first read up on meshes since this is what that function returns. I also suggest that you read the MSDN help page on the function.

I'm sure you will find the implementation of this very simple.

Hope that helps.

Dave

Share this post


Link to post
Share on other sites
This might help. (link)

ID3DXMesh *boxmesh;
Now add code in InitDeviceObjects() to fill the mesh variable with box-shaped geometry:
D3DXCreateBox(m_pd3dDevice, 1, 1, 1, &boxmesh, NULL);
The three numeric arguments here are the length, width, and height of the box, by the way.

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!