# Synopsis

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

# Purpose

Write a glTF file from a GDX model

# Description

See gdx_WriteGLTF for general description. This function maps each GDX_TESSELLATED_GROUP entity to a single mesh. Each mesh will have a single primitive for all the triangles, a single primitive for each polyline and a single primitive for all the points. The polylines have to be split out to individual primitives so the data is interpretted correctly.

# 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