Sign in to follow this  

ID3DXLine via D3DXCreateLine?

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

This topic is 4839 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this