InitEngine3D()

Syntax

Result = InitEngine3D([Flags [, LibraryName$])
Description
Initializes the 3D environment for later use. You must put this function at the top of your source code if you want to use any of the 3D functions.

Parameters

Flags (optional) It can be a combination of the following values:
  #PB_Engine3D_NoLog      : No log will be written to disk or printed to the console (default).
  #PB_Engine3D_DebugLog   : A debug log file named 'Ogre.log' will be created in the current directory, to help
                            debugging or user reports. A lot of actions are logged in this file, but it shouldn't 
                            affect performances so it can even be activated for a release product.
  #PB_Engine3D_DebugOutput: The actions are printed to the console. You must remember to set the executable format 
                            to 'Console' when you are compiling your programs.
  #PB_Engine3D_EnableCG   : Enable CG library support. It needs to be installed before use from nvidia website.
LibraryName$ (optional) Name of the Engine3D file which should be loaded. If it is put to another place than the current directory, it could be specified here.

Return value

Returns non-zero if the library has been successfully loaded, zero otherwise. If initialization fails, the program should quit or all 3D function calls should be disabled.

Remarks

InitEngine3D() tries to load the Engine3D library (named 'Engine3D.dll' on Windows, 'engine3d.so' on Linux and 'engine3d.dylib' on OS X, found in the PureBasic/compilers/ directory). If it fails, it's probably because the library is not found or doesn't match the current PureBasic version. On Windows, a recent version of DirectX 9 needs to be installed (can be found here: DirectX 9 runtime installer).

See Also

OpenScreen(), OpenWindowedScreen(), Add3DArchive()

Supported OS

All

<- GetZ() - Engine3D Index - LoadWorld() ->