Original Post
i almost copied the entire (working)tut for
displaying a simple line on the screen,
but after couple of frames it displays
an access violation...
my source:
whats wrong?
Gil
Gil Zussman gil@gilzu.com http://www.gilzu.com
g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,0), 1.0f, 0 ); g_pd3dDevice->BeginScene(); CVertex *vtxQuad; vbuffer->Lock(0, 0, (BYTE **)&vtxQuad, NULL); vtxQuad[0].Create(1, 0, 0); vtxQuad[1].Create(0, 1, 0); vbuffer->Unlock(); g_pd3dDevice->SetStreamSource(0, vbuffer, sizeof(CVertex)); g_pd3dDevice->SetVertexShader(D3DFVF_CVertex); g_pd3dDevice->DrawPrimitive(D3DPT_LINELIST, 0, 1); g_pd3dDevice->EndScene(); g_pd3dDevice->Present( NULL, NULL, NULL, NULL );
Gil Zussman gil@gilzu.com http://www.gilzu.com