[PB5.20x86 WinXP]
Long time since I needed to code anything 3D. My first point of call was to run an app (exe) I wrote in Feb2013 - it failed on 3D Engine initialisation, which it had not done before. Ran compile/run in PB5.20. The failure is still there but where should the Ogre log be found?
I'm not sure why there is a failure, but I have changed my anti-virus this year. Are there any files for 3D that the anti-virus should be told not to touch?
IdeasVacuum wrote:Hi DK_PETER, I will check that, but sgScriptsFolder and sgTextureFolder are global vars containing the full path to the respective folders.
Nope, the paths are correct (and the files expected are in the folders). As I mentioned, the app was working fine........
@IdeasVacuum
Then your example is incomplete and doesn't show the problem.
The only error I get is a bad parameter type: String expected.
Anyway.. I hope you solve it.
Current configurations:
Ubuntu 20.04/64 bit - Window 10 64 bit
Intel 6800K, GeForce Gtx 1060, 32 gb ram.
Amd Ryzen 9 5950X, GeForce 3070, 128 gb ram.
If InitEngine3D() is failing then I'd guess your missing DirectX9.0c or your hardware doesn't support it. Unless are you using OpenGL?
Do Purebasic's 3D examples still run on your computer?
IdeasVacuum wrote:
The failure is still there but where should the Ogre log be found?
The Ogre log should be created in the same location as your executable or pb file depending on what your currently using.
what I do, and mostly a error,
I copy the Engine3D.dll to my creating directory, when I make an .exe file,
and when I upgrade PB, I forget, and get an error.
Maybe check in your creation directory for the 3D dll (older version)
and if so, replace it with the 5.20 3D dll.
marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Maybe check in your creation directory for the 3D dll
....and that was indeed 'it'. I think it was possibly snaffled away by Avast, which this weekend complained about an app (one of mine for internal use only) that it was happy with for months previously. I do very much like Avast, but it does get terribly confusing from time to time.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Also make sure to be careful if you store a copy of the "Engine3d.dll" inside the same directory as your source files. When you compile/run a program from the editor, if it finds that the "Engine3d.dll" exists in the same location, then it will try to use that DLL rather then the one associated with the version of PureBasic you are using. If they are different then the editor might throw an exception/error on perfectly good code or may just crash the editor all together. So if you wish to store this DLL file in the same location then just make sure that it is the same version as the version of PureBasic you are using. If no DLL is found at the same location then the editor will automatically load the correct version for the version of PureBasic you are using.
You can also specify which DLL version you want to use by supplying the second argument to the InitEngine3d() command:
- Result = InitEngine3D([Flags [, LibraryName$]) -
Where "LibraryName$" can be the new name of the "Engine3d.dll" you wish to use.
Of course once an EXE is created then it is NECESSARY to place a copy of the "Engine3d.dll" (or whatever you decide to change the name to) inside the same location in order for the program to work.
You are right ...
In the beginning I forgot this and I had a lot of problems, by starting my .exe files.
Now I know for good ... it is hard to learn sometimes.
marc,
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Samuel wrote:If this is true that would mean the D3D9 plugin is being loaded at start up even when it's not being used.
DX9 is required on Windows even when using OpenGL because of the use of DirectInput for keyboard/mouse handling.
Years ago, MS told developers to quit using DirectInput for keyboard/mouse for compatibility reasons (it is not 100% reliable on all systems) and instead to use WM_Input. Unfortunately, many products (PB, GLBasic, etc) still use DirectInput.
Best wishes to the PB community. Thank you for the memories.