|
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
'Textur-Blending ausschalten, da die folgenden
'Texturen normal gerendert werden sollen
Call Device.SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, False
Call Device.SetTexture(0, texSky)
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxSky(0), UBound(vxSky()) + 1, D3DDP_WAIT)
Call Device.SetTexture(0, texHorizont)
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxHorizont(0), UBound(vxHorizont()) + 1, D3DDP_WAIT)
Call Device.SetTexture(0, texFloor)
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxBoden(0), UBound(vxBoden()) + 1, D3DDP_WAIT)
Call Device.SetTexture(0, texBrickWall)
'Textur-Blending aktivieren, da die folgende
'Textur mit Textur-Blending gerendert werden soll
Call Device.SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, True)
Call Device.SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_ONE)
Call Device.SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_ONE)
Call Device.DrawPrimitive(D3DPT_TRIANGLELIST, D3DFVF_LVERTEX, _
vxWand(0), UBound(vxWand()) + 1, D3DDP_WAIT)
Device.EndScene
End Sub
|
|