Code:
struct CUSTOMVERTEX
{
FLOAT x, y, z;
DWORD color;
};
CUSTOMVERTEX v1[] =
{
{ -10, 17, 0.5f, 0xffff8000 },
{ 10, 17, 0.5f, 0xffff8000 },
{ 0, 0, 0.5f, 0xffff0000 },
{ 20, 0, 0.5f, 0xff00ff00 },
{ 10, -17, 0.5f, 0xff0000ff },
{ -10, -17, 0.5f, 0xffff00ff },
{ -20, 0, 0.5f, 0xffff00ff },
};
FLOAT angle = 0;
pDevice->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 255), 1.0f, 0);
pDevice->BeginScene();
pDevice->SetStreamSource(0, pVB, 0, sizeof(CUSTOMVERTEX));
pDevice->SetFVF(D3DFVF_CUSTOMVERTEX);
D3DXMatrixIdentity(&temp);
D3DXMatrixRotationZ(&temp, angle);
D3DXMatrixTranslation(&temp, 0, 100, 0);
D3DXVECTOR3 eye(0, 0, -5);
D3DXVECTOR3 at(0, 0, 0);
D3DXVECTOR3 up(0, 1, 0);
D3DXMatrixLookAtLH(&view, &eye, &at, &up);
D3DXMatrixMultiply(&world, &temp, &view);
D3DXMatrixIdentity(&view);
D3DXMatrixPerspectiveLH(&proj, 80, 60, 1, -10);
pDevice->SetTransform(D3DTS_WORLDMATRIX(0), &world);
pDevice->SetTransform(D3DTS_VIEW, &view);
pDevice->SetTransform(D3DTS_PROJECTION, &proj);
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 1);
D3DXMatrixIdentity(&temp);
D3DXMatrixRotationZ(&temp, D3DX_PI);
D3DXMatrixTranslation(&temp, 50, -100, 0);
D3DXMatrixIdentity(&view);
D3DXMatrixLookAtLH(&view, &eye, &at, &up);
D3DXMatrixMultiply(&world, &temp, &view);
pDevice->SetTransform(D3DTS_WORLDMATRIX(0), &world);
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 1);
I was playing with this a bit so it might be slightly messed up.