Result = Add3DArchive(Path$, Type)
Add a new absolute or relative path to the current 3D path list. All the 3D functions which need to load data (e.g. texture, mesh, sky, world) will use this path.

You may wonder why there is a special way to handle the files for 3D functions? Because it makes the data access more flexible and now, you can access the data using the standard filesystem or directly via the archive file like a .zip file. It's a very cool feature because you can pack all your data in one big compressed file, and then access the assets as if these were contained a standard directory.


Path$ The path to add to the 3D path list. It can be a real filesystem path, or a ZIP archive.
Type It can be one of the following value:
  #PB_3DArchive_FileSystem : Standard directory
  #PB_3DArchive_Zip        : Compressed zip file

Return value

Returns non-zero if the path has been successfully added to the 3D resource list, zero otherwise.


  Add3DArchive("", #PB_3DArchive_Zip) ; Add the .zip as a directory in the path
  LoadTexture(0, "MyTexture.jpg")               ; load the MyTexture.jpg from the zip
  LoadTexture(1, "World/Grass.jpg")             ; load the Grass.jpg from the zip, in the World\ path

Supported OS


Engine3D Index - AmbientColor() ->