Original Post
I am trying to use this to draw lines on the screen but when the program quits it crashs something to do with the winheap. The problem seem to be with the array of D3DXVECTOR2 that is passed into the draw function. The line draws fine exept when quiting. It still has a problem quitting even with just the vertexlist declared in the header. It must be something to do with the way i have declared the array. define in the class private section:- LPD3DXLINE m_line; D3DXVECTOR2 VertexList[2]; bool CGfxEntitySprite::Initialise(const char* textureFilename) { HRESULT hr = D3DXCreateLine(gD3dDevice, &m_line); m_line->SetWidth(1); VertexList[0] = D3DXVECTOR2(10,10); VertexList[1] = D3DXVECTOR2(50,50); return TRUE; } void CGfxEntitySprite::Render(const D3DXMATRIX &matWorld) { m_line->Begin(); m_line->Draw(VertexList, 2, D3DCOLOR_XRGB(0,255,255));//Render to screen m_line->End(); } [Edited by - jammy5202 on April 23, 2006 4:45:46 AM]