|
Public Sub Render3D()
Device.Clear 1, ClearRec(), _
D3DCLEAR_TARGET Or D3DCLEAR_ZBUFFER, _
DX7.CreateColorRGBA(0.04, 0.04, 0.07, 1), 1, 0
Device.BeginScene
Call Device.SetTexture(0, texSkyBox(0))
'Textur-Koordinaten ausserhalb der Textur werden nicht gespiegelt
Call Device.SetTextureStageState( _
0, D3DTSS_ADDRESS, D3DTADDRESS_CLAMP)
'Bilinearen Texturfilter verwenden, damit die Skybox nicht
'so grob gerastert wird
Call Device.SetTextureStageState( _
0, D3DTSS_MAGFILTER, D3DTFG_LINEAR)
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(0), 6, D3DDP_WAIT)
Call Device.SetTexture(0, texSkyBox(1))
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(6), 6, D3DDP_WAIT)
Call Device.SetTexture(0, texSkyBox(2))
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(12), 6, D3DDP_WAIT)
Call Device.SetTexture(0, texSkyBox(3))
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(18), 6, D3DDP_WAIT)
Call Device.SetTexture(0, texSkyBox(5))
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(24), 6, D3DDP_WAIT)
Call Device.SetTexture(0, texSkyBox(4))
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSkyBox(30), 6, D3DDP_WAIT)
Device.EndScene
End Sub
|
|