    

 ## On this page

  

 

 # Test009

 Last update: 16.07.2025 

Lighted points.

This example creates texture colored points with different sizes.

Special attributes are used describing the points that allow the auto-generated shader to render the points. The points are defined by a single vertex and single size parameter. The shader takes this information and creates varying sized points that are perfectly spherical. &lt;script src="/ansys/nexus/viewer-loader.js"&gt;&lt;/script&gt;

/\*

 \* Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \* 

 \* Restricted Rights Legend

 \*

 \* Use, duplication, or disclosure of this

 \* software and its documentation by the

 \* Government is subject to restrictions as

 \* set forth in subdivision \[(b)(3)(ii)\] of

 \* the Rights in Technical Data and Computer

 \* Software clause at 52.227-7013.

 \*/

\#include &lt;vector&gt;

\#include &lt;cstdlib&gt;

 

\#include "GLTFWriter.h"

\#include "test.h"

 

using namespace ANSYS::Nexus;

 

// Lighted points

TESTFUNC(LightedPoints)

{

 GLTFWriter::GLTF *gltf = <a id="a0" name="a0"></a>[GLTFWriter::GLTF::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#ab7ba6d114c76cb60baf41aa6f13e9494)("MyApp", "1.0", functionName.c_str(), type);

 if (!gltf)

 throw std::runtime_error("Can't create GLTF");

 

 // TEXTURE

 std::vector&lt;unsigned char&gt; colors;

 colors.push_back(0); colors.push_back(0); colors.push_back(255); // blue

 colors.push_back(0); colors.push_back(255); colors.push_back(255); // cyan

 colors.push_back(0); colors.push_back(255); colors.push_back(0); // green

 colors.push_back(255); colors.push_back(255); colors.push_back(0); // yellow

 colors.push_back(255); colors.push_back(0); colors.push_back(0); // red

 GLTFWriter::Texture *rainbowGradientTexture = <a id="a1" name="a1"></a>[GLTFWriter::Texture::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#a3d15e0e6ad83cd7d50bb81ce2d0f30c8)(gltf, <a id="a2" name="a2"></a>[GLTFWriter::Texture::TF\_RGB](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#aba6db4f52b9f0a1a866bce302b6d8964aaa8ea9a0e6b83932a6a882b1655e8e59), (unsigned int)colors.size() / 3, &amp;colors[0], false);

 

 // generate vertices, normals, and texture coordinates for a ball

 std::vector&lt;float&gt; vertices;

 std::vector&lt;unsigned int&gt; lines;

 std::vector&lt;unsigned int&gt; triangles;

 GLTFWriter::Test::MakeSphere(0, 0, 0, 0.5, 16, vertices, lines, triangles);

 const unsigned int numVertices = (unsigned int)vertices.size() / 3;

 std::vector&lt;float&gt; textureCoords(numVertices);

 // TEXCOORDS

 const double coordMin = -5;

 const double coordMax = 5;

 std::vector&lt;float&gt; texCoords;

 double coordInc = 1.0 / (numVertices - 1);

 double c = 0;

 for (unsigned int i = 0; i &lt; numVertices; ++i) {

 texCoords.push_back((float)(coordMin + c * (coordMax - coordMin)));

 c += coordInc;

 }

 // POINTSIZE

 std::srand(0);

 const double sizeMin = 5;

 const double sizeMax = 20;

 std::vector&lt;float&gt; pointSizes;

 for (unsigned int i = 0; i &lt; numVertices; ++i)

 pointSizes.push_back((float)((sizeMax - sizeMin) * (std::rand() % 10000) / 10000.0 + sizeMin));

 

 // SCENE

 GLTFWriter::Scene *scene = <a id="a3" name="a3"></a>[GLTFWriter::Scene::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#aac8bcb85d4361abba99053b3c56eb08b)(gltf, "TestScene", "m", 1.0, <a id="a4" name="a4"></a>[GLTFWriter::Scene::BT\_SOLID](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#ac17baf491cdba3613b0aa39719a3dbd8aeea551002921bb989b3ed35678ec982b), 0.5, 0.5, 0.5);

 if (!scene) {

 <a id="a5" name="a5"></a>[GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create scene");

 }

 

 // LIGHTS

 {

 // LIGHT NODE

 GLTFWriter::Node *lightNode = <a id="a6" name="a6"></a>[GLTFWriter::Node::CreateLight](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a7883624afdcaae45b6018944a040a01c)(gltf);

 if (!lightNode || !scene-&gt;SetLight(lightNode)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create light");

 }

 

 // LIGHTS

 GLTFWriter::Light *light1 = <a id="a7" name="a7"></a>[GLTFWriter::Light::CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a14a825d32570498d64b6a427fb4f8207)(gltf);

 lightNode-&gt;AppendLight(light1);

 

 GLTFWriter::Light *light2 = <a id="a8" name="a8"></a>[GLTFWriter::Light::CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#aa54e23609ac5f7a1a6808b62ee48163d)(gltf, 1, 1, 1, -1, -1, -3);

 lightNode-&gt;AppendLight(light2);

 }

 

 // CAMERA

 {

 // CAMERA

 GLTFWriter::Camera *camera = <a id="a9" name="a9"></a>[GLTFWriter::Camera::CreateOrthographic](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_camera.xhtml#acab0b8344a7bb8b65c9690d221705377)(gltf);

 // CAMERA NODE

 std::vector&lt;double&gt; mat(16);

 mat[0] = 1;

 mat[1] = 0;

 mat[2] = 0;

 mat[3] = 0;

 mat[4] = 0;

 mat[5] = 1;

 mat[6] = 0;

 mat[7] = 0;

 mat[8] = 0;

 mat[9] = 0;

 mat[10] = 1;

 mat[11] = 0;

 mat[12] = 0;

 mat[13] = 0;

 mat[14] = 0;

 mat[15] = 1;

 GLTFWriter::Node *cameraNode = <a id="a10" name="a10"></a>[GLTFWriter::Node::CreateCamera](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#af6c4767cc8271d9d39816d278538197a)(gltf, camera, "TestCamera", &amp;mat[0]);

 scene-&gt;SetCamera(cameraNode);

 }

 

 // NODE

 {

 GLTFWriter::Node *node = <a id="a11" name="a11"></a>[GLTFWriter::Node::CreateMesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a4dd14791b2b9e65c115aa7a9e3f340e8)(gltf, "3D Points");

 if (!node || !scene-&gt;AppendMesh(node)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create mesh node");

 }

 

 // MESH

 GLTFWriter::Mesh *mesh = <a id="a12" name="a12"></a>[GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f7803b1b1eb72e4005665ca33f42788)(gltf);

 if (!mesh || !node-&gt;AppendMesh(mesh)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create mesh");

 }

 

 // TECHNIQUE

 GLTFWriter::Technique *technique = <a id="a13" name="a13"></a>[GLTFWriter::Technique::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_technique.xhtml#a13382537cb3622195e7cf0bf33e202c2)(gltf);

 if (!technique ||

 // TECHNIQUE STATES

 !technique-&gt;AppendState(<a id="a14" name="a14"></a>[GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)(gltf, <a id="a15" name="a15"></a>[GLTFWriter::State::ST\_BLENDENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a333b0ebeb6a896a3b0b973da1f1ce56a), 1)) ||

 !technique-&gt;AppendState([GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)(gltf, <a id="a16" name="a16"></a>[GLTFWriter::State::ST\_DEPTHTESTENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a5a304a50ef0c9a98124f4c998ec47f3b), 1))) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create technique");

 }

 

 // MATERIAL

 GLTFWriter::Material *material = <a id="a17" name="a17"></a>[GLTFWriter::Material::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_material.xhtml#a683cf8ee4a674e8e7a7b01c97797eecc)(gltf, technique);

 if (!material ||

 // MATERIAL UNIFORM VALUES

 !material-&gt;AppendValue(<a id="a18" name="a18"></a>[GLTFWriter::Value::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_value.xhtml#aee78dae95614f843f10d5e19f9d55d61)(gltf, "texture0", rainbowGradientTexture-&gt;GetID()))) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create material");

 }

 

 // POSITION ATTRIBUTE

 GLTFWriter::Attribute *vertex = <a id="a19" name="a19"></a>[GLTFWriter::Attribute::CreatePosition](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a2490057f37890b1dd7debe04ddf1fd6f)(gltf, numVertices, &amp;vertices[0]);

 

 // TEXCOORD ATTRIBUTE

 GLTFWriter::Attribute *texCoord = <a id="a20" name="a20"></a>[GLTFWriter::Attribute::CreateTextureCoord](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#af4bd5279c34932ef6afd15a858d39a6c)(gltf, 0, numVertices, &amp;texCoords[0]);

 float mn;

 float mx;

 mn = (float)coordMin;

 mx = (float)coordMax;

 if (!texCoord || !texCoord-&gt;SetMinMax(<a id="a21" name="a21"></a>[GLTFWriter::Attribute::AT\_FLOAT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#aa787c451052ac912fd9af91c4ff54ddba6d124c894e5bdc043eeebec0f852e857), &amp;mn, &amp;mx)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create textureCoord");

 }

 

 // POINTSIZE ATTRIBUTE

 GLTFWriter::Attribute *pointSize = <a id="a22" name="a22"></a>[GLTFWriter::Attribute::CreatePointSize](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a9c19f5df3d1335f023f9bec96a8f054f)(gltf, numVertices, &amp;pointSizes[0]);

 

 // PRIMITIVE

 GLTFWriter::Primitive *primitive = <a id="a23" name="a23"></a>[GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11dce37f59247e26bd6973ba5d7fefeb)(gltf, <a id="a24" name="a24"></a>[GLTFWriter::Primitive::PT\_POINTS](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea0774f687d37a015adb12a7c57f157190), material);

 if (!primitive ||

 !mesh-&gt;AppendPrimitive(primitive) ||

 !primitive-&gt;AppendAttribute(vertex) ||

 !primitive-&gt;AppendAttribute(texCoord) ||

 !primitive-&gt;AppendAttribute(pointSize)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create primitive");

 }

 }

 

 if (!gltf-&gt;Write()) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Error creating file");

 }

 

 <a id="a25" name="a25"></a>[GLTFWriter::GLTF::GLTFError](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafe) error = gltf-&gt;GetError();

 

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 

 if (error != <a id="a26" name="a26"></a>[GLTFWriter::GLTF::GLTF\_ERROR\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafea049c3b804e69ae05c02f4c2dedf4e0ea))

 throw std::runtime_error("Error creating file");

}

[ANSYS::Nexus::GLTFWriter::Attribute::CreatePosition](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a2490057f37890b1dd7debe04ddf1fd6f)

static Attribute * CreatePosition(GLTF *gltf, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Attribute::CreatePointSize](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a9c19f5df3d1335f023f9bec96a8f054f)

static Attribute * CreatePointSize(GLTF *gltf, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Attribute::AT\_FLOAT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#aa787c451052ac912fd9af91c4ff54ddba6d124c894e5bdc043eeebec0f852e857)

@ AT_FLOAT

4 byte float

**Definition:** [GLTFAttribute.h:42](_g_l_t_f_attribute_8h_source.xhtml#l00042)



[ANSYS::Nexus::GLTFWriter::Attribute::CreateTextureCoord](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#af4bd5279c34932ef6afd15a858d39a6c)

static Attribute * CreateTextureCoord(GLTF *gltf, unsigned int num, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Camera::CreateOrthographic](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_camera.xhtml#acab0b8344a7bb8b65c9690d221705377)

static Camera * CreateOrthographic(GLTF *gltf, const char *name=0, float xmag=1, float ymag=1, float zfar=1000, float znear=-1000)



[ANSYS::Nexus::GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)

static void Destroy(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::GLTF::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#ab7ba6d114c76cb60baf41aa6f13e9494)

static GLTF * Create(const char *application, const char *applicationVersion, const char *filePath, OutputType fileType=OT_AVZ)



[ANSYS::Nexus::GLTFWriter::GLTF::GLTFError](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafe)

GLTFError

**Definition:** [GLTFGLTF.h:35](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00035)



[ANSYS::Nexus::GLTFWriter::GLTF::GLTF\_ERROR\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafea049c3b804e69ae05c02f4c2dedf4e0ea)

@ GLTF_ERROR_NONE

No Error.

**Definition:** [GLTFGLTF.h:36](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00036)



[ANSYS::Nexus::GLTFWriter::Light::CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a14a825d32570498d64b6a427fb4f8207)

static Light * CreateAmbient(GLTF *gltf, float colR=0.3, float colG=0.3, float colB=0.3)



[ANSYS::Nexus::GLTFWriter::Light::CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#aa54e23609ac5f7a1a6808b62ee48163d)

static Light * CreateDirectional(GLTF *gltf, float colR=1, float colG=1, float colB=1, float dirX=0, float dirY=0, float dirZ=-1, float specColR=1, float specColG=1, float specColB=1, float shininess=100)



[ANSYS::Nexus::GLTFWriter::Material::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_material.xhtml#a683cf8ee4a674e8e7a7b01c97797eecc)

static Material * Create(GLTF *gltf, Technique *technique)



[ANSYS::Nexus::GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f7803b1b1eb72e4005665ca33f42788)

static Mesh * Create(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::Node::CreateMesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a4dd14791b2b9e65c115aa7a9e3f340e8)

static Node * CreateMesh(GLTF *gltf, const char *name=0, bool visible=true, const double *matrix=0)



[ANSYS::Nexus::GLTFWriter::Node::CreateLight](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a7883624afdcaae45b6018944a040a01c)

static Node * CreateLight(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::Node::CreateCamera](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#af6c4767cc8271d9d39816d278538197a)

static Node * CreateCamera(GLTF *gltf, Camera *camera, const char *name=0, const double *matrix=0)



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_POINTS](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea0774f687d37a015adb12a7c57f157190)

@ PT_POINTS

Treats each vertex as a single point.

**Definition:** [GLTFMesh.h:35](_g_l_t_f_mesh_8h_source.xhtml#l00035)



[ANSYS::Nexus::GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11dce37f59247e26bd6973ba5d7fefeb)

static Primitive * Create(GLTF *gltf, PrimitiveType type, Material *material, Index *indices=0, bool isPickable=true)



[ANSYS::Nexus::GLTFWriter::Scene::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#aac8bcb85d4361abba99053b3c56eb08b)

static Scene * Create(GLTF *gltf, const char *name=0, const char *units=0, float scale=1, Scene::BackgroundType backgroundType=Scene::BT_NONE, float r1=0, float g1=0, float b1=0, float r2=0, float g2=0, float b2=0)



[ANSYS::Nexus::GLTFWriter::Scene::BT\_SOLID](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#ac17baf491cdba3613b0aa39719a3dbd8aeea551002921bb989b3ed35678ec982b)

@ BT_SOLID

Make solid color from color 1.

**Definition:** [GLTFScene.h:35](_g_l_t_f_scene_8h_source.xhtml#l00035)



[ANSYS::Nexus::GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)

static State * Create(GLTF *gltf, StateType type, double v1, double v2=0, double v3=0, double v4=0)



[ANSYS::Nexus::GLTFWriter::State::ST\_BLENDENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a333b0ebeb6a896a3b0b973da1f1ce56a)

@ ST_BLENDENABLE

Enables blending of fragment colors. Possible values are:

**Definition:** [GLTFTechnique.h:166](_g_l_t_f_technique_8h_source.xhtml#l00166)



[ANSYS::Nexus::GLTFWriter::State::ST\_DEPTHTESTENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a5a304a50ef0c9a98124f4c998ec47f3b)

@ ST_DEPTHTESTENABLE

Enables testing of depth buffer. Possible values are:

**Definition:** [GLTFTechnique.h:186](_g_l_t_f_technique_8h_source.xhtml#l00186)



[ANSYS::Nexus::GLTFWriter::Technique::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_technique.xhtml#a13382537cb3622195e7cf0bf33e202c2)

static Technique * Create(GLTF *gltf, Program *program=0, bool is2D=false)



[ANSYS::Nexus::GLTFWriter::Texture::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#a3d15e0e6ad83cd7d50bb81ce2d0f30c8)

static Texture * Create(GLTF *gltf, TextureFormat format, TextureTarget target, Sampler *sampler, Image *image)



[ANSYS::Nexus::GLTFWriter::Texture::TF\_RGB](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#aba6db4f52b9f0a1a866bce302b6d8964aaa8ea9a0e6b83932a6a882b1655e8e59)

@ TF_RGB

3 unsigned chars per pixel.

**Definition:** [GLTFTexture.h:34](_g_l_t_f_texture_8h_source.xhtml#l00034)



[ANSYS::Nexus::GLTFWriter::Value::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_value.xhtml#aee78dae95614f843f10d5e19f9d55d61)

static Value * Create(GLTF *gltf, const char *name, const Value *value=0)