Archived

This topic is now archived and is closed to further replies.

NeKe

ID3DXLine Crashes my computer

Recommended Posts

Full Memory dump evil blue screen of death!! When I attempt to use the ID3DXLine->DrawTransform()my computer crashes HARD! I have a GeForce3 and I''m running XP?? Has this happened to anyone else? _Neil

Share this post


Link to post
Share on other sites
D3DXVECTOR3 Y_Line[2];

Y_Line[0].x = Y_Line[0].y = Y_Line[0].z = 0.0f;
Y_Line[1].x = Y_Line[1].z = 0.0f;
Y_Line[1].y = 20.0f;

// Set world transformation
D3DXMATRIX matWorld;
D3DXMatrixTranslation( &matWorld, 0.0f, 0.0f, 0.0f );

m_Line->DrawTransform(Y_Line, 2, &matWorld, D3DCOLOR_XRGB(255,255,255));

That''s all I did besides initialize the m_Line object.

All my drivers are up-to-date.

_Neil

Share this post


Link to post
Share on other sites
"Why are you using a 3D vector to represent a line?"

I''m using two 3D vertices because that''s what the function "calls" for...
HRESULT DrawTransform(
CONST D3DXVECTOR3* pVertexList,
DWORD dwVertexListCount,
CONST D3DXMATRIX* pTransform,
D3DCOLOR Color
);

Did you have a suggestion?

_Neil

Share this post


Link to post
Share on other sites
DrawTransform takes 3d points. However, the transform matrix should be world * view * proj, not just the world. That call is for putting 3d lines on screen.

For 2d lines, just use the Draw call.

As for the crash, that''s interesting. Things seem fine there.

I like pie.

Share this post


Link to post
Share on other sites