cjsrch Posted March 18, 2013 Author Share Posted March 18, 2013 In the code"Function TryCreateDirectX8Device() As BooleanDim i As LongOn Error GoTo nextiFor i = 1 To 4Select Case iCase 1Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 2Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_MIXED_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 3Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 4TryCreateDirectX8Device = FalseExit FunctionEnd Selectnexti:NextEnd Function"_____________________________________________________and in my attemptFunction TryCreateDirectX8Device() As BooleanDim i As Longi = 0On Error GoTo nextinextireturnpoint:Select Case iCase 1Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 2Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_MIXED_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 3Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 4TryCreateDirectX8Device = FalseExit FunctionEnd Selectnexti:i = i + 1Err.ClearGoTo nextireturnpoint:End Function______________________________________________________________________neither workI know i can swap case 3 and 1 around and "fix" this however i would like to make it work as intended where it tries to load to case 1then case 2 then case 3 then case 4 if all else failBOTH of the codes written work fine for my desktop however neither work for my laptop unless i make it load to software by changing i=3 or swapping the cases.has anyone found a real fix for this?Search only turns up the swap method Link to comment Share on other sites More sharing options...
abhi2011 Posted March 18, 2013 Share Posted March 18, 2013 This is because of the graphics card not supporting that specific type of graphics. I don't think you can do much about it. Link to comment Share on other sites More sharing options...
cjsrch Posted March 18, 2013 Author Share Posted March 18, 2013 After playing more with it It works where it tries hardware first if error then software but its that mixed method that just locked it up from even trying the last options.For now ill leave the contents of case two commented out even tho that to is a band aid and not an actual fix. Link to comment Share on other sites More sharing options...
abhi2011 Posted March 18, 2013 Share Posted March 18, 2013 Try interchanging it. Or use what Crystalshire (the game) does Link to comment Share on other sites More sharing options...
cjsrch Posted March 18, 2013 Author Share Posted March 18, 2013 Isnt that closed source? I know they released a early version of their source but nothing up todate last time i looked,Im going to leave this unsolved for a little longer but for any one new to this ill post the fix.Load VB6 client source.Go to modgraphicssearch for Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,Locate the CASE structurechange this_____________________________________________________Case 2Set Direct3D_Device = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.picScreen.hwnd, 'D3DCREATE_MIXED_VERTEXPROCESSING, Direct3D_Window)TryCreateDirectX8Device = TrueExit FunctionCase 3________________________________________________________________TO THIS_____________________________________________________Case 2Case 3____________iRemove or comment out anything inside case 2and recompile and remake the .exe via the start menu Link to comment Share on other sites More sharing options...
abhi2011 Posted March 18, 2013 Share Posted March 18, 2013 I told you to do what Crystalshire does not rip the code. You can try setting the default rendering mode D3DADAPTER_DEFAULT. And the player can choose according to his computer the needed setting. If the setting isn't supported, an error is caught msgBox shown and the mode is reverted back to previous one. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now