Direct3D Engine Initialising
I've finished the sounds & hardware finding tutorials fo DirectX (8.1), now I'm trying my hand at the graphics side (which I left 'till last on purpose)! :D ;)
I've tried "lesson 1" of the graphics tutorials on directx4vb.com, & the first routine (which I need for more or less everything I do in DX) doesn't work!!! :mad: I've tried this on 2 pc's now & can't see why this screws up. Any help'll be majorly appriciated! Cheers!
VB Code:
Public Function Initialise() As Boolean
Dim DispMode As D3DDISPLAYMODE
Dim D3DWindow As D3DPRESENT_PARAMETERS
Set Dx = New DirectX8
Set D3D = Dx.Direct3DCreate()
' Windowed Mode
D3D.GetAdapterDisplayMode CONST_D3DCONST.D3DADAPTER_DEFAULT, DispMode
With D3DWindow
.Windowed = 1
.SwapEffect = D3DSWAPEFFECT_COPY_VSYNC
.BackBufferFormat = DispMode.Format
End With
Set D3DDevice = D3D.CreateDevice(0, D3DDEVTYPE_REF, frmMain.hWnd, _
D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DWindow)
End Function