Synopsis

PDX_MSGT gdx_WriteGLTF(long option, int gdxModel, const char *gltfFile, const char *asset)

Purpose

Write a glTF file from a GDX model

Description

The specified gdxModel will be converted to the specified gltfFile. In addition to creating the gltfFile, a binary file with the extension .bin will be created to store all of the geometric data. Only tessellated data, attributes and assembly structure are currently supported. If the option @d GDX_BINARY is specified, a single binary glTF (GLB) file will be created. NOTE: glTF has a requirement for a single mesh per node and since each gdx component gets mapped to a node, any gdx component with more than 1 geometry will be converted to assembly with an instance for each geometry. This means the specified gdxModel could be modified upon return from this function.

Input

option

GDX_BINARY

Save as single binary file .glb

gdxModel

GDX model to process and map to glTF

gltfFile

Name of glTF file to create (.gltf) or (.glb)

asset

Name of application creating glTF file

Return

GDX_NOERR or error