Skip to main content
GameDev.net gamedev.net
🔒 Locked

Whats wrong here?

Started by Gilzu May 25, 2002 at 6:09 AM 0 replies 250+ views
Original Post
Gilzu
Gilzu
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:
  
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 );
  
whats wrong? Gil
Gil Zussman gil@gilzu.com http://www.gilzu.com
[email=gil@gilzu.com]Gil Zussman[/email]Check out Goose Chase, Coming this fall!http://www.gilzu.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.