Code: Select all
#IDirect3DDevice7_SetRenderState = 20 * 4
#D3DRENDERSTATE_CULLMODE = 22
#D3DCULL_NONE = $1
#D3DCULL_CW = $2
#D3DCULL_CCW = $3
#D3DCULL_FORCE_DWORD = $7FFFFFFF
Procedure GetD3Ddevice_interface()
Shared D3Ddevice_interface
; Fill Interface variable
!extrn _PB_Direct3D_Device
!MOV dword EAX, [_PB_Direct3D_Device]
!MOV dword [v_D3Ddevice_interface],EAX
EndProcedure
Procedure SetRenderState(a,b)
Shared D3Ddevice_interface
If D3Ddevice_interface = 0
GetD3Ddevice_interface()
EndIf
CallCOM(#IDirect3DDevice7_SetRenderState ,D3Ddevice_interface,a,b) ; Set Render-State
EndProcedure
