Jump to content
  • Advertisement
Sign in to follow this  
djkennedy00

ID3DXLine via D3DXCreateLine?

This topic is 5150 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 am trying to figure out how to create a ID3DXLine object. it seems that D3DXCreateLine is the way to go, but the DirectX9 documentation does not tell me what object to use to access the D3DXCreateLine call. I tried different paths, but was unable to discern which object to use. Any help or code samples would be appreciated. Thanks, Dave

Share this post


Link to post
Share on other sites
Advertisement
D3DXCreateLine is a D3DX utility function. It's not a member function for a class or object instance. To use it, you just need to include the D3DX library <d3dx9.lib> and the D3DX header file <d3dx9shape.h> into your project and source file respectively.

Then the code should look something like :

// Initialize D3D Device and DirectX

// Get a pointer to an ID3DXLINE
LPD3DXLINE pD3DLine = NULL;
D3DXCreateLine(pD3DDevice, &pD3DLine);

// Inside of your render loop
// Use ID3DXLINE functions to begin/draw/end lines


Is that any help?

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!