All Products
Search
Document Center

PolarDB:ST_AsGLB

Last Updated:Mar 28, 2026

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...