    

 ## On this page

  

 

 # GLTFShader

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1/\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00003" name="l00003"></a> 3 \* 

<a id="l00004" name="l00004"></a> 4 \* Restricted Rights Legend

<a id="l00005" name="l00005"></a> 5 \*

<a id="l00006" name="l00006"></a> 6 \* Use, duplication, or disclosure of this

<a id="l00007" name="l00007"></a> 7 \* software and its documentation by the

<a id="l00008" name="l00008"></a> 8 \* Government is subject to restrictions as

<a id="l00009" name="l00009"></a> 9 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00010" name="l00010"></a> 10 \* the Rights in Technical Data and Computer

<a id="l00011" name="l00011"></a> 11 \* Software clause at 52.227-7013.

<a id="l00012" name="l00012"></a> 12 \*/

<a id="l00013" name="l00013"></a> 13\#ifndef \_\_INCLUDED\_GLTF\_GLTFSHADER\_\_

<a id="l00014" name="l00014"></a> 14\#define \_\_INCLUDED\_GLTF\_GLTFSHADER\_\_

<a id="l00015" name="l00015"></a> 15 

<a id="l00016" name="l00016"></a> 16\#include "GLTFCommon.h"

<a id="l00017" name="l00017"></a> 17\#include "GLTFObject.h"

<a id="l00018" name="l00018"></a> 18 

<a id="l00019" name="l00019"></a> 19namespace [ANSYS](namespace_a_n_s_y_s.xhtml) { namespace AVZ { namespace GLTFWriter {

<a id="l00020" name="l00020"></a> 20 class GLTF;

<a id="l00021" name="l00021"></a> 21 

<a id="l00025" name="l00025"></a>[ 25](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml) class [Shader](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml) : public Object

<a id="l00026" name="l00026"></a> 26 {

<a id="l00027" name="l00027"></a> 27 protected:

<a id="l00028" name="l00028"></a> 28 virtual [~Shader](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml)() {}

<a id="l00029" name="l00029"></a> 29 

<a id="l00030" name="l00030"></a> 30 public:

<a id="l00033" name="l00033"></a>[ 33](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml#a6992cedf57147d15867859bb24dffeaf) static GLTFWRITERSPEC [Shader](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml) *[Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml#a6992cedf57147d15867859bb24dffeaf)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00034" name="l00034"></a> 34 const char *shaderText, 

<a id="l00035" name="l00035"></a> 35 unsigned int numAttributes, 

<a id="l00036" name="l00036"></a> 36 const char **attributes, 

<a id="l00037" name="l00037"></a> 37 unsigned int numUniforms, 

<a id="l00038" name="l00038"></a> 38 const char **uniforms 

<a id="l00039" name="l00039"></a> 39 );

<a id="l00040" name="l00040"></a> 40 };



<a id="l00041" name="l00041"></a> 41 

<a id="l00042" name="l00042"></a> 42} } }

<a id="l00043" name="l00043"></a> 43 

<a id="l00044" name="l00044"></a> 44\#endif

[ANSYS::AVZ::GLTFWriter::GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml)

This is the main class of the GLTFWriter.

**Definition** [GLTFGLTF.h:32](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00031)



[ANSYS::AVZ::GLTFWriter::Shader](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml)

Shaders are the GLSL executable code for vertex and fragment.

**Definition** [GLTFShader.h:26](#l00025)



[ANSYS::AVZ::GLTFWriter::Shader::Create](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_shader.xhtml#a6992cedf57147d15867859bb24dffeaf)

static Shader * Create(GLTF *gltf, const char *shaderText, unsigned int numAttributes, const char **attributes, unsigned int numUniforms, const char **uniforms)



[ANSYS](namespace_a_n_s_y_s.xhtml)

GLTFWriter API Documentation.

**Definition** [GLTFAnimation.h:19](_g_l_t_f_animation_8h_source.xhtml#l00019)