3d Rendering
Loading 3D Mesh Files
View:
There are two ways of using 3d mesh files in your apps, you can either load the files at runtime(works for native builds only) which will load the data when your app is running, or you can bake them, producing source files you can directly include in your project, it reduces load time. To support web platforms, you are advice to use the second method.
Loading at Runtime
The loader functions will return a status code indicating the success or failure of the operation. A status code of 0 indicates success, a status higher than 0 indicates a warning and a status lower than 0 indicates an error.
Loading from baked data
At the root of your project folder lies an assets folder, which is expected to hold your
game assets, including sprites, images, sound and 3d objects, if you place an obj
file in assets/obj or a gltf file in assets/gltf i.e you create subfolders in the assets
folder, then when you build your application, gama will automatically generate .h files
which you can incude in your app.
Create a file at assets/obj/cube.obj, and in that file insert this:
Then you run gama bake to generate a c header, gama bake -c will delete
the files and regenerate the header. You can then include and use the file:
