|
|
Option Explicit
Dim DX As New DirectX8
Dim DX_D3D As Direct3D8
Dim D3D_Mode As D3DDISPLAYMODE
Dim D3D_PP As D3DPRESENT_PARAMETERS
Dim D3D_Device As Direct3DDevice8
Private Sub Command1_Click()
Set DX_D3D = DX.Direct3DCreate()
DX_D3D.GetAdapterDisplayMode D3DADAPTER_DEFAULT, D3D_Mode
With D3D_PP
.Windowed = 1
.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
.BackBufferCount = D3D_Mode.Format
End With
Set D3D_Device = DX_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, Me.hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3D_PP)
End Sub |
|