ST_AsGLB

Updated at:
Copy as MD

Converts a scene object or OSG (OpenSceneGraph) object to a GLB binary object.

Syntax

bytea ST_AsGLB(scene sceneObject);

Parameters

ParameterTypeDescription
sceneObjectsceneThe scene object to convert.

Description

ST_AsGLB serializes a scene object to the GLB (GL Binary) format, which is the binary container format of glTF. The function accepts both scene objects and OSG objects as input.

Examples

SELECT ST_AsGLB(ST_sceneFromText('{"type" : "gltf", "content" : {"accessors":...}}'));

Output:

\x676c544602...