Jump to content
  • Advertisement
Sign in to follow this  
wsfz

How to create a mesh of cube ?

This topic is 4560 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 amazedly find that there is no such function as "D3DXCreateCube" in Directx 9, then how can i get a mesh of cube just like getting other types of mesh with functions such as "D3DCreateSphere","D3DCreateCylinder" and so on ?

Share this post


Link to post
Share on other sites
Advertisement
Managed Directx ----
Mesh myMesh = new Mesh();
myMesh.Box(Device,10,10,10);

public static Mesh Box(Device, float, float, float);
public static Mesh Box(Device, float, float, float, out GraphicsStream);

C++ Directx ----
D3DXCreateBox for the win ..

HRESULT D3DXCreateBox(
LPDIRECT3DDEVICE9 pDevice,
FLOAT Width,
FLOAT Height,
FLOAT Depth,
LPD3DXMESH * ppMesh,
LPD3DXBUFFER * ppAdjacency
);

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!