void Render()
{
//only render if the device has been setup and is not null
if( p_d3dDevice == NULL )
return;
// Clear the back buffer to white
p_d3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_XRGB(0,0,255), 1.0f, 0 );
HRESULT beginHr = p_d3dDevice->BeginScene();
if( SUCCEEDED( beginHr ) )
{
//This is where im going to render the results
p_d3dDevice->SetStreamSource( 0, g_kt->GetVertexBuffer(), 0, sizeof(CUSTOMVERTEX) );
p_d3dDevice->SetFVF( D3DFVF_CUSTOMVERTEX );
p_d3dDevice->DrawPrimitive( D3DPT_TRIANGLELIST, 0, 1 );
// End the scene
p_d3dDevice->EndScene();
}
p_d3dDevice->Present( NULL, NULL, NULL, NULL );
}
#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE)