Page 1 of 1

3D problem with new computer and PB installation

Posted: Thu Jul 06, 2023 5:05 pm
by mrw
Hi,
I just installed the latest PB(6.02) to date on a Win10 laptop, and when I run something that has the InitEngine3D() command I get the error "The 3D Engine can´t be initialized".
I have not had PB installed on this machine before. The default compiler subsystem is "DirectX11" and my laptop is running DX12 with no errors when I run "dxdiag".
What do I have to do to get the 3D engine system in PB to work?
I have installed some 3D-games that utilize DX9, DX11 and DX12 and also OpenGL and Vulcan and they all work without any issues so I assume the video drivers and those subsystems work.
The laptop has 2 gfx-cards, both an Intel and an Nvidia, if that might have something to do with this?
I did try to change, in the Nvidia settings, which card the purebasic.exe app should use but it didn´t make any difference.

Any help on this in much appreciated.

//Andreas..

Re: 3D problem with new computer and PB installation

Posted: Thu Jul 06, 2023 7:34 pm
by HeX0R
Change the InitEngine3D() command in the example source into InitEngine3D(#PB_Engine3D_DebugLog) and examine ogre.log.

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 9:58 am
by benubi
+ When you compile your executable, make sure Engine3D.dll is copied in the same directory as the .exe file (and that they are for the same x64 or x86 target architecture).

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 10:24 am
by mrw
Thanks for your replies.
I got it to work when I cleared the value in Compiler Options and Library Subsystems.
I was also wrong about "DirectX11" being a default value in PB. Atleast in PB v6.02 a blank value is the default.
I learned that the compiler options are saved individually in the .pb code file itself. Did not know that. :)

I also learned that in PB v6 and newer only OpenGL is used for HW3D operations, when older versions could use both DirectX and OpenGL as HW3D.
Would be interesting to know why this is? This would mean that from now on all HW3D program cannot use DirectX. Please correct me if I´m wrong here.

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 11:49 am
by mk-soft
Available SubSystem (enter in compiler option)
- DirectX9
- DirectX11

OpenGL its default

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 11:54 am
by mrw
For me, I get the error above in my original post when I have "DirectX11" listed as sybsystem.
But games that use HW3D and DirectX11 works on this computer so why doesn´t PB work for me?
If I put "DirectX9", then it works, but not 11.

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 12:00 pm
by mrw
HeX0R wrote: Thu Jul 06, 2023 7:34 pm Change the InitEngine3D() command in the example source into InitEngine3D(#PB_Engine3D_DebugLog) and examine ogre.log.
I just tried this with "DirectX11" as subsystem and there are no errors in the ogre.log file.
There are about 30 lines and these 2 are the last:
13:01:45: *-*-* OGRE Initialising
13:01:45: *-*-* Version 1.8.2 (Byatis)

If I check the same log using blank sybsystem I get lots more information.

Re: 3D problem with new computer and PB installation

Posted: Fri Jul 07, 2023 12:24 pm
by mk-soft
Unfortunately, I can't test it because I only have a Windows 10 VM on Parallels. (Optimised for OpenGL)