Visualization Library 2.0.0-b3

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
vlxutils.hpp
Go to the documentation of this file.
1 /**************************************************************************************/
2 /* */
3 /* Visualization Library */
4 /* http://visualizationlibrary.org */
5 /* */
6 /* Copyright (c) 2005-2017, Michele Bosi */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without modification, */
10 /* are permitted provided that the following conditions are met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, this */
13 /* list of conditions and the following disclaimer. */
14 /* */
15 /* - Redistributions in binary form must reproduce the above copyright notice, this */
16 /* list of conditions and the following disclaimer in the documentation and/or */
17 /* other materials provided with the distribution. */
18 /* */
19 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND */
20 /* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED */
21 /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */
22 /* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR */
23 /* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES */
24 /* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */
25 /* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON */
26 /* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT */
27 /* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
28 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
29 /* */
30 /**************************************************************************************/
31 
32 #ifndef vlxutils_INCLUDE_ONCE
33 #define vlxutils_INCLUDE_ONCE
34 
35 #include <vlCore/VLXValue.hpp>
36 #include <vlCore/Matrix4.hpp>
37 #include <vlCore/Vector4.hpp>
38 #include <vlCore/Log.hpp>
39 #include <vlCore/Say.hpp>
40 #include <vlCore/VLXSerializer.hpp>
41 
42 namespace vl
43 {
44  inline std::string vlx_makeTag(const Object* obj) { return std::string("<") + obj->classType().name() + ">"; }
45 
46  inline VLXValue vlx_Identifier(const std::string& str) { return VLXValue(str.c_str(), VLXValue::Identifier); }
47 
48  inline VLXValue vlx_ID(const std::string& str) { return VLXValue(str.c_str(), VLXValue::ID); }
49 
50  inline VLXValue vlx_String(const std::string& str) { return VLXValue(str.c_str(), VLXValue::String); }
51 
52  inline VLXValue vlx_Rawtext(const std::string& str) { return VLXValue( new VLXRawtextBlock(NULL, str.c_str()) ); }
53 
54  inline vec2 vlx_vec2(const VLXArrayReal* arr) { VL_CHECK(arr->value().size() == 2); vec2 v; arr->copyTo(v.ptr()); return v; }
55 
56  inline vec3 vlx_vec3(const VLXArrayReal* arr) { VL_CHECK(arr->value().size() == 3); vec3 v; arr->copyTo(v.ptr()); return v; }
57 
58  inline vec4 vlx_vec4(const VLXArrayReal* arr) { VL_CHECK(arr->value().size() == 4); vec4 v; arr->copyTo(v.ptr()); return v; }
59 
60  inline ivec4 vlx_ivec4(const VLXArrayInteger* arr) { VL_CHECK(arr->value().size() == 4); ivec4 v; arr->copyTo(v.ptr()); return v; }
61 
62  inline uvec4 vlx_uivec4(const VLXArrayInteger* arr) { VL_CHECK(arr->value().size() == 4); uvec4 v; arr->copyTo(v.ptr()); return v; }
63 
64  inline VLXValue vlx_toValue(const std::vector<int>& vec)
65  {
66  VLXValue value;
67  value.setArray( new VLXArrayInteger );
68  value.getArrayInteger()->value().resize( vec.size() );
69  if (vec.size())
70  value.getArrayInteger()->copyFrom(&vec[0]);
71  return value;
72  }
73 
74  inline VLXValue vlx_toValue(const vec4& vec)
75  {
76  VLXValue val( new VLXArrayReal );
77  VLXArrayReal* arr = val.getArrayReal();
78  arr->value().resize(4);
79  arr->value()[0] = vec.x();
80  arr->value()[1] = vec.y();
81  arr->value()[2] = vec.z();
82  arr->value()[3] = vec.w();
83  return val;
84  }
85 
86  inline VLXValue vlx_toValue(const ivec4& vec)
87  {
88  VLXValue val( new VLXArrayInteger );
89  VLXArrayInteger* arr = val.getArrayInteger();
90  arr->value().resize(4);
91  arr->value()[0] = vec.x();
92  arr->value()[1] = vec.y();
93  arr->value()[2] = vec.z();
94  arr->value()[3] = vec.w();
95  return val;
96  }
97 
98  inline VLXValue vlx_toValue(const uvec4& vec)
99  {
100  VLXValue val( new VLXArrayInteger );
101  VLXArrayInteger* arr = val.getArrayInteger();
102  arr->value().resize(4);
103  arr->value()[0] = vec.x();
104  arr->value()[1] = vec.y();
105  arr->value()[2] = vec.z();
106  arr->value()[3] = vec.w();
107  return val;
108  }
109 
110  inline VLXValue vlx_toValue(const vec3& vec)
111  {
112  VLXValue val( new VLXArrayReal );
113  VLXArrayReal* arr = val.getArrayReal();
114  arr->value().resize(3);
115  arr->value()[0] = vec.x();
116  arr->value()[1] = vec.y();
117  arr->value()[2] = vec.z();
118  return val;
119  }
120 
121  inline VLXValue vlx_toValue(const vec2& vec)
122  {
123  VLXValue val( new VLXArrayReal );
124  VLXArrayReal* arr = val.getArrayReal();
125  arr->value().resize(2);
126  arr->value()[0] = vec.x();
127  arr->value()[1] = vec.y();
128  return val;
129  }
130 
131  inline bool vlx_isTranslation(const mat4& mat)
132  {
133  mat4 tmp = mat;
134  tmp.setT( vec3(0,0,0) );
135  return tmp.isIdentity();
136  }
137 
138  inline bool vlx_isScaling(const mat4& mat)
139  {
140  mat4 tmp = mat;
141  tmp.e(0,0) = 1;
142  tmp.e(1,1) = 1;
143  tmp.e(2,2) = 1;
144  return tmp.isIdentity();
145  }
146 
147  inline VLXValue vlx_toValue(const mat4& mat)
148  {
149  VLXValue matrix_list( new VLXList );
150 
151  if (vlx_isTranslation(mat))
152  {
153  VLXValue value( new VLXArrayReal("<Translate>") );
154  value.getArrayReal()->value().resize(3);
155  value.getArrayReal()->value()[0] = mat.getT().x();
156  value.getArrayReal()->value()[1] = mat.getT().y();
157  value.getArrayReal()->value()[2] = mat.getT().z();
158  matrix_list.getList()->value().push_back( value );
159  }
160  else
161  if (vlx_isScaling(mat))
162  {
163  VLXValue value( new VLXArrayReal("<Scale>") );
164  value.getArrayReal()->value().resize(3);
165  value.getArrayReal()->value()[0] = mat.e(0,0);
166  value.getArrayReal()->value()[1] = mat.e(1,1);
167  value.getArrayReal()->value()[2] = mat.e(2,2);
168  matrix_list.getList()->value().push_back( value );
169  }
170  else
171  {
172  VLXValue value( new VLXArrayReal("<Matrix>") );
173  value.getArrayReal()->value().resize(4*4);
174  // if we transpose this we have to transpose also the uniform matrices
175  value.getArrayReal()->copyFrom(mat.ptr());
176  matrix_list.getList()->value().push_back( value );
177  }
178 
179  return matrix_list;
180  }
181 
182  inline mat4 vlx_mat4( const VLXArrayReal* arr )
183  {
184  mat4 mat;
185  arr->copyTo(mat.ptr());
186  return mat;
187  }
188 
189  inline mat4 vlx_mat4( const VLXList* list )
190  {
191  mat4 mat;
192 
193  for(size_t i=0; i<list->value().size(); ++i)
194  {
195  const VLXValue& value = list->value()[i];
196  if (value.type() != VLXValue::ArrayReal)
197  {
198  Log::error( Say("Line %n : parse error during matrix import.\n") << value.lineNumber() );
199  return mat4::getNull();
200  }
201  // composition of subtransforms is made by post multiplication like for COLLADA.
202  const VLXArrayReal* arr = value.getArrayReal();
203  if (arr->tag() == "<Translate>")
204  {
205  vec3 tr = vlx_vec3( arr );
206  mat = mat * mat4::getTranslation(tr);
207  }
208  else
209  if (arr->tag() == "<Scale>")
210  {
211  vec3 sc = vlx_vec3( arr );
212  mat = mat * mat4::getScaling(sc);
213  }
214  else
215  if (arr->tag() == "<Matrix>")
216  {
217  mat4 m = vlx_mat4( arr );
218  mat = mat * m;
219  }
220  else
221  if (arr->tag() == "<LookAt>")
222  {
223  // implements the camera's view-matrix look-at as specified by COLLADA
224  if (arr->value().size() != 9)
225  {
226  Log::error( Say("Line %n : <LookAt> must have 9 floats, 3 for 'eye', 3 for 'look' and 3 for 'up'.\n") << arr->lineNumber() << arr->tag() );
227  }
228  else
229  {
230  vec3 eye, look, up;
231  eye.x() = (float)arr->value()[0];
232  eye.y() = (float)arr->value()[1];
233  eye.z() = (float)arr->value()[2];
234  look.x() = (float)arr->value()[3];
235  look.y() = (float)arr->value()[4];
236  look.z() = (float)arr->value()[5];
237  up.x() = (float)arr->value()[6];
238  up.y() = (float)arr->value()[7];
239  up.z() = (float)arr->value()[8];
240  mat = mat * mat4::getLookAt(eye, look, up);
241  }
242  }
243  else
244  if (arr->tag() == "<Skew>")
245  {
246  Log::error("<Skew> tag not yet supported.\n");
247  }
248  else
249  {
250  Log::error( Say("Line %n : unknown tag '%s' ignored.\n") << arr->lineNumber() << arr->tag() );
251  }
252  }
253 
254  return mat;
255  }
256 
258  {
259  switch(pt)
260  {
261  default:
262  case PMT_UserProjection: return "PMT_UserProjection";
263  case PMT_OrthographicProjection: return "PMT_OrthographicProjection";
264  case PMT_PerspectiveProjection: return "PMT_PerspectiveProjection";
265  case PMT_PerspectiveProjectionFrustum: return "PMT_PerspectiveProjectionFrustum";
266  }
267  }
268 
270  {
271  if( value.getIdentifier() == "PMT_OrthographicProjection") return PMT_OrthographicProjection;
272  if( value.getIdentifier() == "PMT_PerspectiveProjection") return PMT_PerspectiveProjection;
273  if( value.getIdentifier() == "PMT_PerspectiveProjectionFrustum") return PMT_PerspectiveProjectionFrustum;
274  if( value.getIdentifier() == "PMT_UserProjection") return PMT_UserProjection;
275 
276  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
278  return PMT_UserProjection;
279  }
280 
281  inline const char* vlx_EClearColorMode(EClearColorMode ccm)
282  {
283  switch(ccm)
284  {
285  default:
286  case CCM_Float: return "CCM_Float";
287  case CCM_Int: return "CCM_Int";
288  case CCM_UInt: return "CCM_UInt";
289  }
290  }
291 
293  {
294  if( value.getIdentifier() == "CCM_Int") return CCM_Int;
295  if( value.getIdentifier() == "CCM_UInt") return CCM_UInt;
296  if( value.getIdentifier() == "CCM_Float") return CCM_Float;
297 
298  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
300  return CCM_Float;
301  }
302 
303  inline const char* vlx_EClearFlags(EClearFlags cf)
304  {
305  switch(cf)
306  {
307  default:
308  case CF_CLEAR_COLOR_DEPTH_STENCIL: return "CF_CLEAR_COLOR_DEPTH_STENCIL";
309  case CF_DO_NOT_CLEAR: return "CF_DO_NOT_CLEAR";
310  case CF_CLEAR_COLOR: return "CF_CLEAR_COLOR";
311  case CF_CLEAR_DEPTH: return "CF_CLEAR_DEPTH";
312  case CF_CLEAR_STENCIL: return "CF_CLEAR_STENCIL";
313  case CF_CLEAR_COLOR_DEPTH: return "CF_CLEAR_COLOR_DEPTH";
314  case CF_CLEAR_COLOR_STENCIL: return "CF_CLEAR_COLOR_STENCIL";
315  case CF_CLEAR_DEPTH_STENCIL: return "CF_CLEAR_DEPTH_STENCIL";
316  }
317  }
318 
320  {
321  if( value.getIdentifier() == "CF_DO_NOT_CLEAR") return CF_DO_NOT_CLEAR;
322  if( value.getIdentifier() == "CF_CLEAR_COLOR") return CF_CLEAR_COLOR;
323  if( value.getIdentifier() == "CF_CLEAR_DEPTH") return CF_CLEAR_DEPTH;
324  if( value.getIdentifier() == "CF_CLEAR_STENCIL") return CF_CLEAR_STENCIL;
325  if( value.getIdentifier() == "CF_CLEAR_COLOR_DEPTH") return CF_CLEAR_COLOR_DEPTH;
326  if( value.getIdentifier() == "CF_CLEAR_COLOR_STENCIL") return CF_CLEAR_COLOR_STENCIL;
327  if( value.getIdentifier() == "CF_CLEAR_DEPTH_STENCIL") return CF_CLEAR_DEPTH_STENCIL;
328  if( value.getIdentifier() == "CF_CLEAR_COLOR_DEPTH_STENCIL") return CF_CLEAR_COLOR_DEPTH_STENCIL;
329 
330  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
332  return CF_DO_NOT_CLEAR;
333  }
334 
335  inline const char* vlx_EPolygonFace(EPolygonFace pf)
336  {
337  switch(pf)
338  {
339  default:
340  case PF_FRONT_AND_BACK: return "PF_FRONT_AND_BACK";
341  case PF_FRONT: return "PF_FRONT";
342  case PF_BACK: return "PF_BACK";
343  }
344  }
345 
347  {
348  if( value.getIdentifier() == "PF_FRONT") return PF_FRONT;
349  if( value.getIdentifier() == "PF_BACK") return PF_BACK;
350  if( value.getIdentifier() == "PF_FRONT_AND_BACK") return PF_FRONT_AND_BACK;
351 
352  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
354  return PF_FRONT_AND_BACK;
355  }
356 
357  inline const char* vlx_EColorMaterial(EColorMaterial cm)
358  {
359  switch(cm)
360  {
361  default:
362  case CM_AMBIENT_AND_DIFFUSE: return "CM_AMBIENT_AND_DIFFUSE";
363  case CM_EMISSION: return "CM_EMISSION";
364  case CM_AMBIENT: return "CM_AMBIENT";
365  case CM_DIFFUSE: return "CM_DIFFUSE";
366  case CM_SPECULAR: return "CM_SPECULAR";
367  }
368  }
369 
371  {
372  if( value.getIdentifier() == "CM_EMISSION") return CM_EMISSION;
373  if( value.getIdentifier() == "CM_AMBIENT") return CM_AMBIENT;
374  if( value.getIdentifier() == "CM_DIFFUSE") return CM_DIFFUSE;
375  if( value.getIdentifier() == "CM_SPECULAR") return CM_SPECULAR;
376  if( value.getIdentifier() == "CM_AMBIENT_AND_DIFFUSE") return CM_AMBIENT_AND_DIFFUSE;
377 
378  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
380  return CM_AMBIENT_AND_DIFFUSE;
381  }
382 
383  inline const char* vlx_ETextureFormat(ETextureFormat tf)
384  {
385  switch(tf)
386  {
387  default:
388  case TF_UNKNOWN: return "TF_UNKNOWN";
389 
390  case TF_ALPHA : return "TF_ALPHA";
391  case TF_ALPHA4 : return "TF_ALPHA4";
392  case TF_ALPHA8 : return "TF_ALPHA8";
393  case TF_ALPHA12: return "TF_ALPHA12";
394  case TF_ALPHA16: return "TF_ALPHA16";
395 
396  case TF_INTENSITY : return "TF_INTENSITY";
397  case TF_INTENSITY4 : return "TF_INTENSITY4";
398  case TF_INTENSITY8 : return "TF_INTENSITY8";
399  case TF_INTENSITY12: return "TF_INTENSITY12";
400  case TF_INTENSITY16: return "TF_INTENSITY16";
401  case TF_LUMINANCE : return "TF_LUMINANCE";
402  case TF_LUMINANCE4 : return "TF_LUMINANCE4";
403  case TF_LUMINANCE8 : return "TF_LUMINANCE8";
404  case TF_LUMINANCE12: return "TF_LUMINANCE12";
405  case TF_LUMINANCE16: return "TF_LUMINANCE16";
406  case TF_LUMINANCE_ALPHA : return "TF_LUMINANCE_ALPHA";
407  case TF_LUMINANCE4_ALPHA4 : return "TF_LUMINANCE4_ALPHA4";
408  case TF_LUMINANCE6_ALPHA2 : return "TF_LUMINANCE6_ALPHA2";
409  case TF_LUMINANCE8_ALPHA8 : return "TF_LUMINANCE8_ALPHA8";
410  case TF_LUMINANCE12_ALPHA4 : return "TF_LUMINANCE12_ALPHA4";
411  case TF_LUMINANCE12_ALPHA12: return "TF_LUMINANCE12_ALPHA12";
412  case TF_LUMINANCE16_ALPHA16: return "TF_LUMINANCE16_ALPHA16";
413  case TF_R3_G3_B2: return "TF_R3_G3_B2";
414  case TF_RGB : return "TF_RGB";
415  case TF_RGB4 : return "TF_RGB4";
416  case TF_RGB5 : return "TF_RGB5";
417  case TF_RGB8 : return "TF_RGB8";
418  case TF_RGB10 : return "TF_RGB10";
419  case TF_RGB12 : return "TF_RGB12";
420  case TF_RGB16 : return "TF_RGB16";
421  case TF_RGBA : return "TF_RGBA";
422  case TF_RGBA2 : return "TF_RGBA2";
423  case TF_RGBA4 : return "TF_RGBA4";
424  case TF_RGB5_A1 : return "TF_RGB5_A1";
425  case TF_RGBA8 : return "TF_RGBA8";
426  case TF_RGB10_A2: return "TF_RGB10_A2";
427  case TF_RGBA12 : return "TF_RGBA12";
428  case TF_RGBA16 : return "TF_RGBA16";
429 
430  // ARB_texture_float / OpenGL 3
431  case TF_RGBA32F: return "TF_RGBA32F";
432  case TF_RGB32F: return "TF_RGB32F";
433  case TF_ALPHA32F: return "TF_ALPHA32F";
434  case TF_INTENSITY32F: return "TF_INTENSITY32F";
435  case TF_LUMINANCE32F: return "TF_LUMINANCE32F";
436  case TF_LUMINANCE_ALPHA32F: return "TF_LUMINANCE_ALPHA32F";
437  case TF_RGBA16F: return "TF_RGBA16F";
438  case TF_RGB16F: return "TF_RGB16F";
439  case TF_ALPHA16F: return "TF_ALPHA16F";
440  case TF_INTENSITY16F: return "TF_INTENSITY16F";
441  case TF_LUMINANCE16F: return "TF_LUMINANCE16F";
442  case TF_LUMINANCE_ALPHA16F: return "TF_LUMINANCE_ALPHA16F";
443 
444  // from table 3.12 opengl api specs 4.1
445  case TF_R8_SNORM: return "TF_R8_SNORM";
446  case TF_R16_SNORM: return "TF_R16_SNORM";
447  case TF_RG8_SNORM: return "TF_RG8_SNORM";
448  case TF_RG16_SNORM: return "TF_RG16_SNORM";
449  case TF_RGB8_SNORM: return "TF_RGB8_SNORM";
450  case TF_RGBA8_SNORM: return "TF_RGBA8_SNORM";
451  case TF_RGB10_A2UI: return "TF_RGB10_A2UI";
452  case TF_RGBA16_SNORM: return "TF_RGBA16_SNORM";
453  case TF_R11F_G11F_B10F: return "TF_R11F_G11F_B10F";
454  case TF_RGB9_E5: return "TF_RGB9_E5";
455  case TF_RGB8I: return "TF_RGB8I";
456  case TF_RGB8UI: return "TF_RGB8UI";
457  case TF_RGB16I: return "TF_RGB16I";
458  case TF_RGB16UI: return "TF_RGB16UI";
459  case TF_RGB32I: return "TF_RGB32I";
460  case TF_RGB32UI: return "TF_RGB32UI";
461  case TF_RGBA8I: return "TF_RGBA8I";
462  case TF_RGBA8UI: return "TF_RGBA8UI";
463  case TF_RGBA16I: return "TF_RGBA16I";
464  case TF_RGBA16UI: return "TF_RGBA16UI";
465  case TF_RGBA32I: return "TF_RGBA32I";
466  case TF_RGBA32UI: return "TF_TF_RGBA32UI";
467 
468  // ATI_texture_float (the enums are the same as ARB_texture_float)
469  //case TF_RGBA_FLOAT32_ATI: return "TF_RGBA_FLOAT32_ATI";
470  //case TF_RGB_FLOAT32_ATI: return "TF_RGB_FLOAT32_ATI";
471  //case TF_ALPHA_FLOAT32_ATI: return "TF_ALPHA_FLOAT32_ATI";
472  //case TF_INTENSITY_FLOAT32_ATI: return "TF_INTENSITY_FLOAT32_ATI";
473  //case TF_LUMINANCE_FLOAT32_ATI: return "TF_LUMINANCE_FLOAT32_ATI";
474  //case TF_LUMINANCE_ALPHA_FLOAT32_ATI: return "TF_LUMINANCE_ALPHA_FLOAT32_ATI";
475  //case TF_RGBA_FLOAT16_ATI: return "TF_RGBA_FLOAT16_ATI";
476  //case TF_RGB_FLOAT16_ATI: return "TF_RGB_FLOAT16_ATI";
477  //case TF_ALPHA_FLOAT16_ATI: return "TF_ALPHA_FLOAT16_ATI";
478  //case TF_INTENSITY_FLOAT16_ATI: return "TF_INTENSITY_FLOAT16_ATI";
479  //case TF_LUMINANCE_FLOAT16_ATI: return "TF_LUMINANCE_FLOAT16_ATI";
480  //case TF_LUMINANCE_ALPHA_FLOAT16_ATI: return "TF_LUMINANCE_ALPHA_FLOAT16_ATI";
481 
482  // EXT_texture_shared_exponent
483  // case TF_RGB9_E5_EXT: return "TF_RGB9_E5_EXT";
484 
485  // EXT_packed_float
486  // case TF_11F_G11F_B10F_EXT: return "TF_11F_G11F_B10F_EXT";
487 
488  // EXT_packed_depth_stencil / GL_ARB_framebuffer_object
489  case TF_DEPTH_STENCIL : return "TF_DEPTH_STENCIL";
490  case TF_DEPTH24_STENCIL8: return "TF_DEPTH24_STENCIL8";
491 
492  // ARB_depth_buffer_float
493  case TF_DEPTH_COMPONENT32F: return "TF_DEPTH_COMPONENT32F";
494  case TF_DEPTH32F_STENCIL8 : return "TF_DEPTH32F_STENCIL8";
495 
496  // ARB_depth_texture
497  case TF_DEPTH_COMPONENT : return "TF_DEPTH_COMPONENT";
498  case TF_DEPTH_COMPONENT16: return "TF_DEPTH_COMPONENT16";
499  case TF_DEPTH_COMPONENT24: return "TF_DEPTH_COMPONENT24";
500  case TF_DEPTH_COMPONENT32: return "TF_DEPTH_COMPONENT32";
501 
502  // ARB_texture_compression
503  case TF_COMPRESSED_ALPHA : return "TF_COMPRESSED_ALPHA";
504  case TF_COMPRESSED_INTENSITY : return "TF_COMPRESSED_INTENSITY";
505  case TF_COMPRESSED_LUMINANCE : return "TF_COMPRESSED_LUMINANCE";
506  case TF_COMPRESSED_LUMINANCE_ALPHA: return "TF_COMPRESSED_LUMINANCE_ALPHA";
507  case TF_COMPRESSED_RGB : return "TF_COMPRESSED_RGB";
508  case TF_COMPRESSED_RGBA : return "TF_COMPRESSED_RGBA";
509 
510  // 3DFX_texture_compression_FXT1
511  case TF_COMPRESSED_RGB_FXT1_3DFX : return "TF_COMPRESSED_RGB_FXT1_3DFX";
512  case TF_COMPRESSED_RGBA_FXT1_3DFX: return "TF_COMPRESSED_RGBA_FXT1_3DFX";
513 
514  // EXT_texture_compression_s3tc
515  case TF_COMPRESSED_RGB_S3TC_DXT1_EXT : return "TF_COMPRESSED_RGB_S3TC_DXT1_EXT";
516  case TF_COMPRESSED_RGBA_S3TC_DXT1_EXT: return "TF_COMPRESSED_RGBA_S3TC_DXT1_EXT";
517  case TF_COMPRESSED_RGBA_S3TC_DXT3_EXT: return "TF_COMPRESSED_RGBA_S3TC_DXT3_EXT";
518  case TF_COMPRESSED_RGBA_S3TC_DXT5_EXT: return "TF_COMPRESSED_RGBA_S3TC_DXT5_EXT";
519 
520  // EXT_texture_compression_latc
521  case TF_COMPRESSED_LUMINANCE_LATC1_EXT : return "TF_COMPRESSED_LUMINANCE_LATC1_EXT";
522  case TF_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT : return "TF_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT";
523  case TF_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT : return "TF_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT";
524  case TF_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT: return "TF_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT";
525 
526  // EXT_texture_compression_rgtc
527  case TF_COMPRESSED_RED_RGTC1_EXT : return "TF_COMPRESSED_RED_RGTC1_EXT";
528  case TF_COMPRESSED_SIGNED_RED_RGTC1_EXT : return "TF_COMPRESSED_SIGNED_RED_RGTC1_EXT";
529  case TF_COMPRESSED_RED_GREEN_RGTC2_EXT : return "TF_COMPRESSED_RED_GREEN_RGTC2_EXT";
530  case TF_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT: return "TF_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT";
531 
532  // EXT_texture_integer
533  // case TF_RGBA32UI_EXT: return "TF_RGBA32UI_EXT";
534  // case TF_RGB32UI_EXT: return "TF_RGB32UI_EXT";
535  case TF_ALPHA32UI_EXT: return "TF_ALPHA32UI_EXT";
536  case TF_INTENSITY32UI_EXT: return "TF_INTENSITY32UI_EXT";
537  case TF_LUMINANCE32UI_EXT: return "TF_LUMINANCE32UI_EXT";
538  case TF_LUMINANCE_ALPHA32UI_EXT: return "TF_LUMINANCE_ALPHA32UI_EXT";
539 
540  // case TF_RGBA16UI_EXT: return "TF_RGBA16UI_EXT";
541  // case TF_RGB16UI_EXT: return "TF_RGB16UI_EXT";
542  case TF_ALPHA16UI_EXT: return "TF_ALPHA16UI_EXT";
543  case TF_INTENSITY16UI_EXT: return "TF_INTENSITY16UI_EXT";
544  case TF_LUMINANCE16UI_EXT: return "TF_LUMINANCE16UI_EXT";
545  case TF_LUMINANCE_ALPHA16UI_EXT: return "TF_LUMINANCE_ALPHA16UI_EXT";
546 
547  // case TF_RGBA8UI_EXT: return "TF_RGBA8UI_EXT";
548  // case TF_RGB8UI_EXT: return "TF_RGB8UI_EXT";
549  case TF_ALPHA8UI_EXT: return "TF_ALPHA8UI_EXT";
550  case TF_INTENSITY8UI_EXT: return "TF_INTENSITY8UI_EXT";
551  case TF_LUMINANCE8UI_EXT: return "TF_LUMINANCE8UI_EXT";
552  case TF_LUMINANCE_ALPHA8UI_EXT: return "TF_LUMINANCE_ALPHA8UI_EXT";
553 
554  // case TF_RGBA32I_EXT: return "TF_RGBA32I_EXT";
555  // case TF_RGB32I_EXT: return "TF_RGB32I_EXT";
556  case TF_ALPHA32I_EXT: return "TF_ALPHA32I_EXT";
557  case TF_INTENSITY32I_EXT: return "TF_INTENSITY32I_EXT";
558  case TF_LUMINANCE32I_EXT: return "TF_LUMINANCE32I_EXT";
559  case TF_LUMINANCE_ALPHA32I_EXT: return "TF_LUMINANCE_ALPHA32I_EXT";
560 
561  // case TF_RGBA16I_EXT: return "TF_RGBA16I_EXT";
562  // case TF_RGB16I_EXT: return "TF_RGB16I_EXT";
563  case TF_ALPHA16I_EXT: return "TF_ALPHA16I_EXT";
564  case TF_INTENSITY16I_EXT: return "TF_INTENSITY16I_EXT";
565  case TF_LUMINANCE16I_EXT: return "TF_LUMINANCE16I_EXT";
566  case TF_LUMINANCE_ALPHA16I_EXT: return "TF_LUMINANCE_ALPHA16I_EXT";
567 
568  // case TF_RGBA8I_EXT: return "TF_RGBA8I_EXT";
569  // case TF_RGB8I_EXT: return "TF_RGB8I_EXT";
570  case TF_ALPHA8I_EXT: return "TF_ALPHA8I_EXT";
571  case TF_INTENSITY8I_EXT: return "TF_INTENSITY8I_EXT";
572  case TF_LUMINANCE8I_EXT: return "TF_LUMINANCE8I_EXT";
573  case TF_LUMINANCE_ALPHA8I_EXT: return "TF_LUMINANCE_ALPHA8I_EXT";
574 
575  // GL_ARB_texture_rg
576  case TF_RED: return "TF_RED";
577  case TF_COMPRESSED_RED: return "TF_COMPRESSED_RED";
578  case TF_COMPRESSED_RG: return "TF_COMPRESSED_RG";
579  case TF_RG: return "TF_RG";
580  case TF_R8: return "TF_R8";
581  case TF_R16: return "TF_R16";
582  case TF_RG8: return "TF_RG8";
583  case TF_RG16: return "TF_RG16";
584  case TF_R16F: return "TF_R16F";
585  case TF_R32F: return "TF_R32F";
586  case TF_RG16F: return "TF_RG16F";
587  case TF_RG32F: return "TF_RG32F";
588  case TF_R8I: return "TF_R8I";
589  case TF_R8UI: return "TF_R8UI";
590  case TF_R16I: return "TF_R16I";
591  case TF_R16UI: return "TF_R16UI";
592  case TF_R32I: return "TF_R32I";
593  case TF_R32UI: return "TF_R32UI";
594  case TF_RG8I: return "TF_RG8I";
595  case TF_RG8UI: return "TF_RG8UI";
596  case TF_RG16I: return "TF_RG16I";
597  case TF_RG16UI: return "TF_RG16UI";
598  case TF_RG32I: return "TF_RG32I";
599  case TF_RG32UI: return "TF_RG32UI";
600 
601  // sRGB OpenGL 2.1
602  case TF_SLUMINANCE_ALPHA: return "TF_SLUMINANCE_ALPHA";
603  case TF_SLUMINANCE8_ALPHA8: return "TF_SLUMINANCE8_ALPHA8";
604  case TF_SLUMINANCE: return "TF_SLUMINANCE";
605  case TF_SLUMINANCE8: return "TF_SLUMINANCE8";
606  case TF_COMPRESSED_SLUMINANCE: return "TF_COMPRESSED_SLUMINANCE";
607  case TF_COMPRESSED_SLUMINANCE_ALPHA: return "TF_COMPRESSED_SLUMINANCE_ALPHA";
608 
609  // sRGB OpenGL 2.1 / 3.x
610  case TF_SRGB: return "TF_SRGB";
611  case TF_SRGB8: return "TF_SRGB8";
612  case TF_SRGB_ALPHA: return "TF_SRGB_ALPHA";
613  case TF_SRGB8_ALPHA8: return "TF_SRGB8_ALPHA8";
614  case TF_COMPRESSED_SRGB: return "TF_COMPRESSED_SRGB";
615  case TF_COMPRESSED_SRGB_ALPHA: return "TF_COMPRESSED_SRGB_ALPHA";
616 
617  // GL_EXT_texture_sRGB compressed formats
618  case TF_COMPRESSED_SRGB_S3TC_DXT1_EXT: return "TF_COMPRESSED_SRGB_S3TC_DXT1_EXT";
619  case TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: return "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT";
620  case TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: return "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT";
621  case TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT: return "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT";
622  }
623  }
624 
626  {
627  if( value.getIdentifier() == "TF_UNKNOWN") return TF_UNKNOWN;
628 
629  if( value.getIdentifier() == "TF_ALPHA") return TF_ALPHA;
630  if( value.getIdentifier() == "TF_ALPHA4") return TF_ALPHA4;
631  if( value.getIdentifier() == "TF_ALPHA8") return TF_ALPHA8;
632  if( value.getIdentifier() == "TF_ALPHA12") return TF_ALPHA12;
633  if( value.getIdentifier() == "TF_ALPHA16") return TF_ALPHA16;
634 
635  if( value.getIdentifier() == "TF_INTENSITY") return TF_INTENSITY;
636  if( value.getIdentifier() == "TF_INTENSITY4") return TF_INTENSITY4;
637  if( value.getIdentifier() == "TF_INTENSITY8") return TF_INTENSITY8;
638  if( value.getIdentifier() == "TF_INTENSITY12") return TF_INTENSITY12;
639  if( value.getIdentifier() == "TF_INTENSITY16") return TF_INTENSITY16;
640  if( value.getIdentifier() == "TF_LUMINANCE") return TF_LUMINANCE;
641  if( value.getIdentifier() == "TF_LUMINANCE4") return TF_LUMINANCE4;
642  if( value.getIdentifier() == "TF_LUMINANCE8") return TF_LUMINANCE8;
643  if( value.getIdentifier() == "TF_LUMINANCE12") return TF_LUMINANCE12;
644  if( value.getIdentifier() == "TF_LUMINANCE16") return TF_LUMINANCE16;
645  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA") return TF_LUMINANCE_ALPHA;
646  if( value.getIdentifier() == "TF_LUMINANCE4_ALPHA4") return TF_LUMINANCE4_ALPHA4;
647  if( value.getIdentifier() == "TF_LUMINANCE6_ALPHA2") return TF_LUMINANCE6_ALPHA2;
648  if( value.getIdentifier() == "TF_LUMINANCE8_ALPHA8") return TF_LUMINANCE8_ALPHA8;
649  if( value.getIdentifier() == "TF_LUMINANCE12_ALPHA4") return TF_LUMINANCE12_ALPHA4;
650  if( value.getIdentifier() == "TF_LUMINANCE12_ALPHA12") return TF_LUMINANCE12_ALPHA12;
651  if( value.getIdentifier() == "TF_LUMINANCE16_ALPHA16") return TF_LUMINANCE16_ALPHA16;
652  if( value.getIdentifier() == "TF_R3_G3_B2") return TF_R3_G3_B2;
653  if( value.getIdentifier() == "TF_RGB") return TF_RGB;
654  if( value.getIdentifier() == "TF_RGB4") return TF_RGB4;
655  if( value.getIdentifier() == "TF_RGB5") return TF_RGB5;
656  if( value.getIdentifier() == "TF_RGB8") return TF_RGB8;
657  if( value.getIdentifier() == "TF_RGB10") return TF_RGB10;
658  if( value.getIdentifier() == "TF_RGB12") return TF_RGB12;
659  if( value.getIdentifier() == "TF_RGB16") return TF_RGB16;
660  if( value.getIdentifier() == "TF_RGBA") return TF_RGBA;
661  if( value.getIdentifier() == "TF_RGBA2") return TF_RGBA2;
662  if( value.getIdentifier() == "TF_RGBA4") return TF_RGBA4;
663  if( value.getIdentifier() == "TF_RGB5_A1") return TF_RGB5_A1;
664  if( value.getIdentifier() == "TF_RGBA8") return TF_RGBA8;
665  if( value.getIdentifier() == "TF_RGB10_A2") return TF_RGB10_A2;
666  if( value.getIdentifier() == "TF_RGBA12") return TF_RGBA12;
667  if( value.getIdentifier() == "TF_RGBA16") return TF_RGBA16;
668 
669  // ARB_texture_float / OpenGL 3
670  if( value.getIdentifier() == "TF_RGBA32F") return TF_RGBA32F;
671  if( value.getIdentifier() == "TF_RGB32F") return TF_RGB32F;
672  if( value.getIdentifier() == "TF_ALPHA32F") return TF_ALPHA32F;
673  if( value.getIdentifier() == "TF_INTENSITY32F") return TF_INTENSITY32F;
674  if( value.getIdentifier() == "TF_LUMINANCE32F") return TF_LUMINANCE32F;
675  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA32F") return TF_LUMINANCE_ALPHA32F;
676  if( value.getIdentifier() == "TF_RGBA16F") return TF_RGBA16F;
677  if( value.getIdentifier() == "TF_RGB16F") return TF_RGB16F;
678  if( value.getIdentifier() == "TF_ALPHA16F") return TF_ALPHA16F;
679  if( value.getIdentifier() == "TF_INTENSITY16F") return TF_INTENSITY16F;
680  if( value.getIdentifier() == "TF_LUMINANCE16F") return TF_LUMINANCE16F;
681  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA16F") return TF_LUMINANCE_ALPHA16F;
682 
683  // from table 3.12 opengl api specs 4.1
684  if( value.getIdentifier() == "TF_R8_SNORM") return TF_R8_SNORM;
685  if( value.getIdentifier() == "TF_R16_SNORM") return TF_R16_SNORM;
686  if( value.getIdentifier() == "TF_RG8_SNORM") return TF_RG8_SNORM;
687  if( value.getIdentifier() == "TF_RG16_SNORM") return TF_RG16_SNORM;
688  if( value.getIdentifier() == "TF_RGB8_SNORM") return TF_RGB8_SNORM;
689  if( value.getIdentifier() == "TF_RGBA8_SNORM") return TF_RGBA8_SNORM;
690  if( value.getIdentifier() == "TF_RGB10_A2UI") return TF_RGB10_A2UI;
691  if( value.getIdentifier() == "TF_RGBA16_SNORM") return TF_RGBA16_SNORM;
692  if( value.getIdentifier() == "TF_R11F_G11F_B10F") return TF_R11F_G11F_B10F;
693  if( value.getIdentifier() == "TF_RGB9_E5") return TF_RGB9_E5;
694  if( value.getIdentifier() == "TF_RGB8I") return TF_RGB8I;
695  if( value.getIdentifier() == "TF_RGB8UI") return TF_RGB8UI;
696  if( value.getIdentifier() == "TF_RGB16I") return TF_RGB16I;
697  if( value.getIdentifier() == "TF_RGB16UI") return TF_RGB16UI;
698  if( value.getIdentifier() == "TF_RGB32I") return TF_RGB32I;
699  if( value.getIdentifier() == "TF_RGB32UI") return TF_RGB32UI;
700  if( value.getIdentifier() == "TF_RGBA8I") return TF_RGBA8I;
701  if( value.getIdentifier() == "TF_RGBA8UI") return TF_RGBA8UI;
702  if( value.getIdentifier() == "TF_RGBA16I") return TF_RGBA16I;
703  if( value.getIdentifier() == "TF_RGBA16UI") return TF_RGBA16UI;
704  if( value.getIdentifier() == "TF_RGBA32I") return TF_RGBA32I;
705  if( value.getIdentifier() == "TF_RGBA32UI") return TF_RGBA32UI;
706 
707  // ATI_texture_float (the enums are the same as ARB_texture_float)
708  if( value.getIdentifier() == "TF_RGBA_FLOAT32_ATI") return TF_RGBA_FLOAT32_ATI;
709  if( value.getIdentifier() == "TF_RGB_FLOAT32_ATI") return TF_RGB_FLOAT32_ATI;
710  if( value.getIdentifier() == "TF_ALPHA_FLOAT32_ATI") return TF_ALPHA_FLOAT32_ATI;
711  if( value.getIdentifier() == "TF_INTENSITY_FLOAT32_ATI") return TF_INTENSITY_FLOAT32_ATI;
712  if( value.getIdentifier() == "TF_LUMINANCE_FLOAT32_ATI") return TF_LUMINANCE_FLOAT32_ATI;
713  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA_FLOAT32_ATI") return TF_LUMINANCE_ALPHA_FLOAT32_ATI;
714  if( value.getIdentifier() == "TF_RGBA_FLOAT16_ATI") return TF_RGBA_FLOAT16_ATI;
715  if( value.getIdentifier() == "TF_RGB_FLOAT16_ATI") return TF_RGB_FLOAT16_ATI;
716  if( value.getIdentifier() == "TF_ALPHA_FLOAT16_ATI") return TF_ALPHA_FLOAT16_ATI;
717  if( value.getIdentifier() == "TF_INTENSITY_FLOAT16_ATI") return TF_INTENSITY_FLOAT16_ATI;
718  if( value.getIdentifier() == "TF_LUMINANCE_FLOAT16_ATI") return TF_LUMINANCE_FLOAT16_ATI;
719  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA_FLOAT16_ATI") return TF_LUMINANCE_ALPHA_FLOAT16_ATI;
720 
721  // EXT_texture_shared_exponent
722  if( value.getIdentifier() == "TF_RGB9_E5_EXT") return TF_RGB9_E5_EXT;
723 
724  // EXT_packed_float
725  if( value.getIdentifier() == "TF_11F_G11F_B10F_EXT") return TF_11F_G11F_B10F_EXT;
726 
727  // EXT_packed_depth_stencil / GL_ARB_framebuffer_object
728  if( value.getIdentifier() == "TF_DEPTH_STENCIL") return TF_DEPTH_STENCIL;
729  if( value.getIdentifier() == "TF_DEPTH24_STENCIL8") return TF_DEPTH24_STENCIL8;
730 
731  // ARB_depth_buffer_float
732  if( value.getIdentifier() == "TF_DEPTH_COMPONENT32F") return TF_DEPTH_COMPONENT32F;
733  if( value.getIdentifier() == "TF_DEPTH32F_STENCIL8") return TF_DEPTH32F_STENCIL8;
734 
735  // ARB_depth_texture
736  if( value.getIdentifier() == "TF_DEPTH_COMPONENT") return TF_DEPTH_COMPONENT;
737  if( value.getIdentifier() == "TF_DEPTH_COMPONENT16") return TF_DEPTH_COMPONENT16;
738  if( value.getIdentifier() == "TF_DEPTH_COMPONENT24") return TF_DEPTH_COMPONENT24;
739  if( value.getIdentifier() == "TF_DEPTH_COMPONENT32") return TF_DEPTH_COMPONENT32;
740 
741  // ARB_texture_compression
742  if( value.getIdentifier() == "TF_COMPRESSED_ALPHA") return TF_COMPRESSED_ALPHA;
743  if( value.getIdentifier() == "TF_COMPRESSED_INTENSITY") return TF_COMPRESSED_INTENSITY;
744  if( value.getIdentifier() == "TF_COMPRESSED_LUMINANCE") return TF_COMPRESSED_LUMINANCE;
745  if( value.getIdentifier() == "TF_COMPRESSED_LUMINANCE_ALPHA") return TF_COMPRESSED_LUMINANCE_ALPHA;
746  if( value.getIdentifier() == "TF_COMPRESSED_RGB") return TF_COMPRESSED_RGB;
747  if( value.getIdentifier() == "TF_COMPRESSED_RGBA") return TF_COMPRESSED_RGBA;
748 
749  // 3DFX_texture_compression_FXT1
750  if( value.getIdentifier() == "TF_COMPRESSED_RGB_FXT1_3DFX") return TF_COMPRESSED_RGB_FXT1_3DFX;
751  if( value.getIdentifier() == "TF_COMPRESSED_RGBA_FXT1_3DFX") return TF_COMPRESSED_RGBA_FXT1_3DFX;
752 
753  // EXT_texture_compression_s3tc
754  if( value.getIdentifier() == "TF_COMPRESSED_RGB_S3TC_DXT1_EXT") return TF_COMPRESSED_RGB_S3TC_DXT1_EXT;
755  if( value.getIdentifier() == "TF_COMPRESSED_RGBA_S3TC_DXT1_EXT") return TF_COMPRESSED_RGBA_S3TC_DXT1_EXT;
756  if( value.getIdentifier() == "TF_COMPRESSED_RGBA_S3TC_DXT3_EXT") return TF_COMPRESSED_RGBA_S3TC_DXT3_EXT;
757  if( value.getIdentifier() == "TF_COMPRESSED_RGBA_S3TC_DXT5_EXT") return TF_COMPRESSED_RGBA_S3TC_DXT5_EXT;
758 
759  // EXT_texture_compression_latc
760  if( value.getIdentifier() == "TF_COMPRESSED_LUMINANCE_LATC1_EXT") return TF_COMPRESSED_LUMINANCE_LATC1_EXT;
761  if( value.getIdentifier() == "TF_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT") return TF_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT;
762  if( value.getIdentifier() == "TF_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT") return TF_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT;
763  if( value.getIdentifier() == "TF_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT") return TF_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT;
764 
765  // EXT_texture_compression_rgtc
766  if( value.getIdentifier() == "TF_COMPRESSED_RED_RGTC1_EXT") return TF_COMPRESSED_RED_RGTC1_EXT;
767  if( value.getIdentifier() == "TF_COMPRESSED_SIGNED_RED_RGTC1_EXT") return TF_COMPRESSED_SIGNED_RED_RGTC1_EXT;
768  if( value.getIdentifier() == "TF_COMPRESSED_RED_GREEN_RGTC2_EXT") return TF_COMPRESSED_RED_GREEN_RGTC2_EXT;
769  if( value.getIdentifier() == "TF_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT") return TF_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT;
770 
771  // EXT_texture_integer
772  if( value.getIdentifier() == "TF_RGBA32UI_EXT") return TF_RGBA32UI_EXT;
773  if( value.getIdentifier() == "TF_RGB32UI_EXT") return TF_RGB32UI_EXT;
774  if( value.getIdentifier() == "TF_ALPHA32UI_EXT") return TF_ALPHA32UI_EXT;
775  if( value.getIdentifier() == "TF_INTENSITY32UI_EXT") return TF_INTENSITY32UI_EXT;
776  if( value.getIdentifier() == "TF_LUMINANCE32UI_EXT") return TF_LUMINANCE32UI_EXT;
777  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA32UI_EXT") return TF_LUMINANCE_ALPHA32UI_EXT;
778 
779  if( value.getIdentifier() == "TF_RGBA16UI_EXT") return TF_RGBA16UI_EXT;
780  if( value.getIdentifier() == "TF_RGB16UI_EXT") return TF_RGB16UI_EXT;
781  if( value.getIdentifier() == "TF_ALPHA16UI_EXT") return TF_ALPHA16UI_EXT;
782  if( value.getIdentifier() == "TF_INTENSITY16UI_EXT") return TF_INTENSITY16UI_EXT;
783  if( value.getIdentifier() == "TF_LUMINANCE16UI_EXT") return TF_LUMINANCE16UI_EXT;
784  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA16UI_EXT") return TF_LUMINANCE_ALPHA16UI_EXT;
785 
786  if( value.getIdentifier() == "TF_RGBA8UI_EXT") return TF_RGBA8UI_EXT;
787  if( value.getIdentifier() == "TF_RGB8UI_EXT") return TF_RGB8UI_EXT;
788  if( value.getIdentifier() == "TF_ALPHA8UI_EXT") return TF_ALPHA8UI_EXT;
789  if( value.getIdentifier() == "TF_INTENSITY8UI_EXT") return TF_INTENSITY8UI_EXT;
790  if( value.getIdentifier() == "TF_LUMINANCE8UI_EXT") return TF_LUMINANCE8UI_EXT;
791  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA8UI_EXT") return TF_LUMINANCE_ALPHA8UI_EXT;
792 
793  if( value.getIdentifier() == "TF_RGBA32I_EXT") return TF_RGBA32I_EXT;
794  if( value.getIdentifier() == "TF_RGB32I_EXT") return TF_RGB32I_EXT;
795  if( value.getIdentifier() == "TF_ALPHA32I_EXT") return TF_ALPHA32I_EXT;
796  if( value.getIdentifier() == "TF_INTENSITY32I_EXT") return TF_INTENSITY32I_EXT;
797  if( value.getIdentifier() == "TF_LUMINANCE32I_EXT") return TF_LUMINANCE32I_EXT;
798  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA32I_EXT") return TF_LUMINANCE_ALPHA32I_EXT;
799 
800  if( value.getIdentifier() == "TF_RGBA16I_EXT") return TF_RGBA16I_EXT;
801  if( value.getIdentifier() == "TF_RGB16I_EXT") return TF_RGB16I_EXT;
802  if( value.getIdentifier() == "TF_ALPHA16I_EXT") return TF_ALPHA16I_EXT;
803  if( value.getIdentifier() == "TF_INTENSITY16I_EXT") return TF_INTENSITY16I_EXT;
804  if( value.getIdentifier() == "TF_LUMINANCE16I_EXT") return TF_LUMINANCE16I_EXT;
805  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA16I_EXT") return TF_LUMINANCE_ALPHA16I_EXT;
806 
807  if( value.getIdentifier() == "TF_RGBA8I_EXT") return TF_RGBA8I_EXT;
808  if( value.getIdentifier() == "TF_RGB8I_EXT") return TF_RGB8I_EXT;
809  if( value.getIdentifier() == "TF_ALPHA8I_EXT") return TF_ALPHA8I_EXT;
810  if( value.getIdentifier() == "TF_INTENSITY8I_EXT") return TF_INTENSITY8I_EXT;
811  if( value.getIdentifier() == "TF_LUMINANCE8I_EXT") return TF_LUMINANCE8I_EXT;
812  if( value.getIdentifier() == "TF_LUMINANCE_ALPHA8I_EXT") return TF_LUMINANCE_ALPHA8I_EXT;
813 
814  // GL_ARB_texture_rg
815  if( value.getIdentifier() == "TF_RED") return TF_RED;
816  if( value.getIdentifier() == "TF_COMPRESSED_RED") return TF_COMPRESSED_RED;
817  if( value.getIdentifier() == "TF_COMPRESSED_RG") return TF_COMPRESSED_RG;
818  if( value.getIdentifier() == "TF_RG") return TF_RG;
819  if( value.getIdentifier() == "TF_R8") return TF_R8;
820  if( value.getIdentifier() == "TF_R16") return TF_R16;
821  if( value.getIdentifier() == "TF_RG8") return TF_RG8;
822  if( value.getIdentifier() == "TF_RG16") return TF_RG16;
823  if( value.getIdentifier() == "TF_R16F") return TF_R16F;
824  if( value.getIdentifier() == "TF_R32F") return TF_R32F;
825  if( value.getIdentifier() == "TF_RG16F") return TF_RG16F;
826  if( value.getIdentifier() == "TF_RG32F") return TF_RG32F;
827  if( value.getIdentifier() == "TF_R8I") return TF_R8I;
828  if( value.getIdentifier() == "TF_R8UI") return TF_R8UI;
829  if( value.getIdentifier() == "TF_R16I") return TF_R16I;
830  if( value.getIdentifier() == "TF_R16UI") return TF_R16UI;
831  if( value.getIdentifier() == "TF_R32I") return TF_R32I;
832  if( value.getIdentifier() == "TF_R32UI") return TF_R32UI;
833  if( value.getIdentifier() == "TF_RG8I") return TF_RG8I;
834  if( value.getIdentifier() == "TF_RG8UI") return TF_RG8UI;
835  if( value.getIdentifier() == "TF_RG16I") return TF_RG16I;
836  if( value.getIdentifier() == "TF_RG16UI") return TF_RG16UI;
837  if( value.getIdentifier() == "TF_RG32I") return TF_RG32I;
838  if( value.getIdentifier() == "TF_RG32UI") return TF_RG32UI;
839 
840  // sRGB OpenGL 2.1
841  if( value.getIdentifier() == "TF_SLUMINANCE_ALPHA") return TF_SLUMINANCE_ALPHA;
842  if( value.getIdentifier() == "TF_SLUMINANCE8_ALPHA8") return TF_SLUMINANCE8_ALPHA8;
843  if( value.getIdentifier() == "TF_SLUMINANCE") return TF_SLUMINANCE;
844  if( value.getIdentifier() == "TF_SLUMINANCE8") return TF_SLUMINANCE8;
845  if( value.getIdentifier() == "TF_COMPRESSED_SLUMINANCE") return TF_COMPRESSED_SLUMINANCE;
846  if( value.getIdentifier() == "TF_COMPRESSED_SLUMINANCE_ALPHA") return TF_COMPRESSED_SLUMINANCE_ALPHA;
847 
848  // sRGB OpenGL 2.1 / 3.x
849  if( value.getIdentifier() == "TF_SRGB") return TF_SRGB;
850  if( value.getIdentifier() == "TF_SRGB8") return TF_SRGB8;
851  if( value.getIdentifier() == "TF_SRGB_ALPHA") return TF_SRGB_ALPHA;
852  if( value.getIdentifier() == "TF_SRGB8_ALPHA8") return TF_SRGB8_ALPHA8;
853  if( value.getIdentifier() == "TF_COMPRESSED_SRGB") return TF_COMPRESSED_SRGB;
854  if( value.getIdentifier() == "TF_COMPRESSED_SRGB_ALPHA") return TF_COMPRESSED_SRGB_ALPHA;
855 
856  // GL_EXT_texture_sRGB compressed formats
857  if( value.getIdentifier() == "TF_COMPRESSED_SRGB_S3TC_DXT1_EXT") return TF_COMPRESSED_SRGB_S3TC_DXT1_EXT;
858  if( value.getIdentifier() == "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT") return TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;
859  if( value.getIdentifier() == "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT") return TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;
860  if( value.getIdentifier() == "TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT") return TF_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT;
861 
862  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
864  return TF_UNKNOWN;
865  }
866 
867  inline const char* vlx_EUniformType(EUniformType type)
868  {
869  switch(type)
870  {
871  default:
872  return "UT_NONE";
873 
874  case UT_INT: return "UT_INT";
875  case UT_INT_VEC2: return "UT_INT_VEC2";
876  case UT_INT_VEC3: return "UT_INT_VEC3";
877  case UT_INT_VEC4: return "UT_INT_VEC4";
878 
879  case UT_UNSIGNED_INT: return "UT_UNSIGNED_INT";
880  case UT_UNSIGNED_INT_VEC2: return "UT_UNSIGNED_INT_VEC2";
881  case UT_UNSIGNED_INT_VEC3: return "UT_UNSIGNED_INT_VEC3";
882  case UT_UNSIGNED_INT_VEC4: return "UT_UNSIGNED_INT_VEC4";
883 
884  case UT_FLOAT: return "UT_FLOAT";
885  case UT_FLOAT_VEC2: return "UT_FLOAT_VEC2";
886  case UT_FLOAT_VEC3: return "UT_FLOAT_VEC3";
887  case UT_FLOAT_VEC4: return "UT_FLOAT_VEC4";
888 
889  case UT_FLOAT_MAT2: return "UT_FLOAT_MAT2";
890  case UT_FLOAT_MAT3: return "UT_FLOAT_MAT3";
891  case UT_FLOAT_MAT4: return "UT_FLOAT_MAT4";
892 
893  case UT_FLOAT_MAT2x3: return "UT_FLOAT_MAT2x3";
894  case UT_FLOAT_MAT3x2: return "UT_FLOAT_MAT3x2";
895  case UT_FLOAT_MAT2x4: return "UT_FLOAT_MAT2x4";
896  case UT_FLOAT_MAT4x2: return "UT_FLOAT_MAT4x2";
897  case UT_FLOAT_MAT3x4: return "UT_FLOAT_MAT3x4";
898  case UT_FLOAT_MAT4x3: return "UT_FLOAT_MAT4x3";
899 
900  case UT_DOUBLE: return "UT_DOUBLE";
901  case UT_DOUBLE_VEC2: return "UT_DOUBLE_VEC2";
902  case UT_DOUBLE_VEC3: return "UT_DOUBLE_VEC3";
903  case UT_DOUBLE_VEC4: return "UT_DOUBLE_VEC4";
904 
905  case UT_DOUBLE_MAT2: return "UT_DOUBLE_MAT2";
906  case UT_DOUBLE_MAT3: return "UT_DOUBLE_MAT3";
907  case UT_DOUBLE_MAT4: return "UT_DOUBLE_MAT4";
908 
909  case UT_DOUBLE_MAT2x3: return "UT_DOUBLE_MAT2x3";
910  case UT_DOUBLE_MAT3x2: return "UT_DOUBLE_MAT3x2";
911  case UT_DOUBLE_MAT2x4: return "UT_DOUBLE_MAT2x4";
912  case UT_DOUBLE_MAT4x2: return "UT_DOUBLE_MAT4x2";
913  case UT_DOUBLE_MAT3x4: return "UT_DOUBLE_MAT3x4";
914  case UT_DOUBLE_MAT4x3: return "UT_DOUBLE_MAT4x3";
915  }
916  }
917 
919  {
920  if( value.getIdentifier() == "UT_INT") return UT_INT;
921  if( value.getIdentifier() == "UT_INT_VEC2") return UT_INT_VEC2;
922  if( value.getIdentifier() == "UT_INT_VEC3") return UT_INT_VEC3;
923  if( value.getIdentifier() == "UT_INT_VEC4") return UT_INT_VEC4;
924 
925  if( value.getIdentifier() == "UT_UNSIGNED_INT") return UT_UNSIGNED_INT;
926  if( value.getIdentifier() == "UT_UNSIGNED_INT_VEC2") return UT_UNSIGNED_INT_VEC2;
927  if( value.getIdentifier() == "UT_UNSIGNED_INT_VEC3") return UT_UNSIGNED_INT_VEC3;
928  if( value.getIdentifier() == "UT_UNSIGNED_INT_VEC4") return UT_UNSIGNED_INT_VEC4;
929 
930  if( value.getIdentifier() == "UT_FLOAT") return UT_FLOAT;
931  if( value.getIdentifier() == "UT_FLOAT_VEC2") return UT_FLOAT_VEC2;
932  if( value.getIdentifier() == "UT_FLOAT_VEC3") return UT_FLOAT_VEC3;
933  if( value.getIdentifier() == "UT_FLOAT_VEC4") return UT_FLOAT_VEC4;
934 
935  if( value.getIdentifier() == "UT_FLOAT_MAT2") return UT_FLOAT_MAT2;
936  if( value.getIdentifier() == "UT_FLOAT_MAT3") return UT_FLOAT_MAT3;
937  if( value.getIdentifier() == "UT_FLOAT_MAT4") return UT_FLOAT_MAT4;
938 
939  if( value.getIdentifier() == "UT_FLOAT_MAT2x3") return UT_FLOAT_MAT2x3;
940  if( value.getIdentifier() == "UT_FLOAT_MAT3x2") return UT_FLOAT_MAT3x2;
941  if( value.getIdentifier() == "UT_FLOAT_MAT2x4") return UT_FLOAT_MAT2x4;
942  if( value.getIdentifier() == "UT_FLOAT_MAT4x2") return UT_FLOAT_MAT4x2;
943  if( value.getIdentifier() == "UT_FLOAT_MAT3x4") return UT_FLOAT_MAT3x4;
944  if( value.getIdentifier() == "UT_FLOAT_MAT4x3") return UT_FLOAT_MAT4x3;
945 
946  if( value.getIdentifier() == "UT_DOUBLE") return UT_DOUBLE;
947  if( value.getIdentifier() == "UT_DOUBLE_VEC2") return UT_DOUBLE_VEC2;
948  if( value.getIdentifier() == "UT_DOUBLE_VEC3") return UT_DOUBLE_VEC3;
949  if( value.getIdentifier() == "UT_DOUBLE_VEC4") return UT_DOUBLE_VEC4;
950 
951  if( value.getIdentifier() == "UT_DOUBLE_MAT2") return UT_DOUBLE_MAT2;
952  if( value.getIdentifier() == "UT_DOUBLE_MAT3") return UT_DOUBLE_MAT3;
953  if( value.getIdentifier() == "UT_DOUBLE_MAT4") return UT_DOUBLE_MAT4;
954 
955  if( value.getIdentifier() == "UT_DOUBLE_MAT2x3") return UT_DOUBLE_MAT2x3;
956  if( value.getIdentifier() == "UT_DOUBLE_MAT3x2") return UT_DOUBLE_MAT3x2;
957  if( value.getIdentifier() == "UT_DOUBLE_MAT2x4") return UT_DOUBLE_MAT2x4;
958  if( value.getIdentifier() == "UT_DOUBLE_MAT4x2") return UT_DOUBLE_MAT4x2;
959  if( value.getIdentifier() == "UT_DOUBLE_MAT3x4") return UT_DOUBLE_MAT3x4;
960  if( value.getIdentifier() == "UT_DOUBLE_MAT4x3") return UT_DOUBLE_MAT4x3;
961 
962  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
964  return UT_NONE;
965  }
966 
967  inline const char* vlx_EDepthTextureMode(EDepthTextureMode dtm)
968  {
969  switch(dtm)
970  {
971  default:
972  case DTM_RED: return "DTM_RED";
973  case DTM_LUMINANCE: return "DTM_LUMINANCE";
974  case DTM_INTENSITY: return "DTM_INTENSITY";
975  case DTM_ALPHA: return "DTM_ALPHA";
976  }
977  }
978 
980  {
981  if( value.getIdentifier() == "DTM_LUMINANCE") return DTM_LUMINANCE;
982  if( value.getIdentifier() == "DTM_INTENSITY") return DTM_INTENSITY;
983  if( value.getIdentifier() == "DTM_ALPHA") return DTM_ALPHA;
984  if( value.getIdentifier() == "DTM_RED") return DTM_RED;
985 
986  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
988  return DTM_RED;
989  }
990 
991  inline const char* vlx_ETexCompareMode(ETexCompareMode tcm)
992  {
993  switch(tcm)
994  {
995  default:
996  case TCM_NONE: return "TCM_NONE";
997  // case TCM_COMPARE_R_TO_TEXTURE: return "TCM_COMPARE_R_TO_TEXTURE";
998  case TCM_COMPARE_REF_DEPTH_TO_TEXTURE: return "TCM_COMPARE_REF_DEPTH_TO_TEXTURE";
999  }
1000  }
1001 
1003  {
1004  if( value.getIdentifier() == "TCM_COMPARE_R_TO_TEXTURE") return TCM_COMPARE_R_TO_TEXTURE;
1005  if( value.getIdentifier() == "TCM_COMPARE_REF_DEPTH_TO_TEXTURE") return TCM_COMPARE_REF_DEPTH_TO_TEXTURE;
1006  if( value.getIdentifier() == "TCM_NONE") return TCM_NONE;
1007 
1008  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1010  return TCM_NONE;
1011  }
1012 
1013  inline const char* vlx_ETexCompareFunc(ETexCompareFunc tcf)
1014  {
1015  switch(tcf)
1016  {
1017  default:
1018  case TCF_LEQUAL: return "TCF_LEQUAL";
1019  case TCF_GEQUAL: return "TCF_GEQUAL";
1020  case TCF_LESS: return "TCF_LESS";
1021  case TCF_GREATER: return "TCF_GREATER";
1022  case TCF_EQUAL: return "TCF_EQUAL";
1023  case TCF_NOTEQUAL: return "TCF_NOTEQUAL";
1024  case TCF_ALWAYS: return "TCF_ALWAYS";
1025  case TCF_NEVER: return "TCF_NEVER";
1026  }
1027  }
1028 
1030  {
1031  if( value.getIdentifier() == "TCF_GEQUAL") return TCF_GEQUAL;
1032  if( value.getIdentifier() == "TCF_LESS") return TCF_LESS;
1033  if( value.getIdentifier() == "TCF_GREATER") return TCF_GREATER;
1034  if( value.getIdentifier() == "TCF_EQUAL") return TCF_EQUAL;
1035  if( value.getIdentifier() == "TCF_NOTEQUAL") return TCF_NOTEQUAL;
1036  if( value.getIdentifier() == "TCF_ALWAYS") return TCF_ALWAYS;
1037  if( value.getIdentifier() == "TCF_NEVER") return TCF_NEVER;
1038  if( value.getIdentifier() == "TCF_LEQUAL") return TCF_LEQUAL;
1039 
1040  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1042  return TCF_LEQUAL;
1043  }
1044 
1045  inline const char* vlx_ETexParamFilter(ETexParamFilter tpf)
1046  {
1047  switch(tpf)
1048  {
1049  default:
1050  case TPF_NEAREST: return "TPF_NEAREST";
1051  case TPF_LINEAR: return "TPF_LINEAR";
1052  case TPF_NEAREST_MIPMAP_NEAREST: return "TPF_NEAREST_MIPMAP_NEAREST";
1053  case TPF_LINEAR_MIPMAP_NEAREST: return "TPF_LINEAR_MIPMAP_NEAREST";
1054  case TPF_NEAREST_MIPMAP_LINEAR: return "TPF_NEAREST_MIPMAP_LINEAR";
1055  case TPF_LINEAR_MIPMAP_LINEAR: return "TPF_LINEAR_MIPMAP_LINEAR";
1056  }
1057  }
1058 
1060  {
1061  if( value.getIdentifier() == "TPF_LINEAR") return TPF_LINEAR;
1062  if( value.getIdentifier() == "TPF_NEAREST_MIPMAP_NEAREST") return TPF_NEAREST_MIPMAP_NEAREST;
1063  if( value.getIdentifier() == "TPF_LINEAR_MIPMAP_NEAREST") return TPF_LINEAR_MIPMAP_NEAREST;
1064  if( value.getIdentifier() == "TPF_NEAREST_MIPMAP_LINEAR") return TPF_NEAREST_MIPMAP_LINEAR;
1065  if( value.getIdentifier() == "TPF_LINEAR_MIPMAP_LINEAR") return TPF_LINEAR_MIPMAP_LINEAR;
1066  if( value.getIdentifier() == "TPF_NEAREST") return TPF_NEAREST;
1067 
1068  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1070  return TPF_NEAREST;
1071  }
1072 
1073  inline const char* vlx_ETexParamWrap(ETexParamWrap tpw)
1074  {
1075  switch(tpw)
1076  {
1077  default:
1078  case TPW_REPEAT: return "TPW_REPEAT";
1079  case TPW_CLAMP: return "TPW_CLAMP";
1080  case TPW_CLAMP_TO_BORDER: return "TPW_CLAMP_TO_BORDER";
1081  case TPW_CLAMP_TO_EDGE: return "TPW_CLAMP_TO_EDGE";
1082  case TPW_MIRRORED_REPEAT: return "TPW_MIRRORED_REPEAT";
1083  }
1084  }
1085 
1087  {
1088  if( value.getIdentifier() == "TPW_CLAMP") return TPW_CLAMP;
1089  if( value.getIdentifier() == "TPW_CLAMP_TO_BORDER") return TPW_CLAMP_TO_BORDER;
1090  if( value.getIdentifier() == "TPW_CLAMP_TO_EDGE") return TPW_CLAMP_TO_EDGE;
1091  if( value.getIdentifier() == "TPW_MIRRORED_REPEAT") return TPW_MIRRORED_REPEAT;
1092  if( value.getIdentifier() == "TPW_REPEAT") return TPW_REPEAT;
1093 
1094  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1096  return TPW_REPEAT;
1097  }
1098 
1099  inline const char* vlx_EEnable(EEnable en)
1100  {
1101  switch(en)
1102  {
1103  default:
1104  return "EN_UnknownEnable";
1105  case EN_BLEND: return "EN_BLEND";
1106  case EN_CULL_FACE: return "EN_CULL_FACE";
1107  case EN_DEPTH_TEST: return "EN_DEPTH_TEST";
1108  case EN_STENCIL_TEST: return "EN_STENCIL_TEST";
1109  case EN_DITHER: return "EN_DITHER";
1110  case EN_POLYGON_OFFSET_FILL: return "EN_POLYGON_OFFSET_FILL";
1111  case EN_POLYGON_OFFSET_LINE: return "EN_POLYGON_OFFSET_LINE";
1112  case EN_POLYGON_OFFSET_POINT: return "EN_POLYGON_OFFSET_POINT";
1113  case EN_COLOR_LOGIC_OP: return "EN_COLOR_LOGIC_OP";
1114  case EN_MULTISAMPLE: return "EN_MULTISAMPLE";
1115  case EN_POINT_SMOOTH: return "EN_POINT_SMOOTH";
1116  case EN_LINE_SMOOTH: return "EN_LINE_SMOOTH";
1117  case EN_POLYGON_SMOOTH: return "EN_POLYGON_SMOOTH";
1118  case EN_LINE_STIPPLE: return "EN_LINE_STIPPLE";
1119  case EN_POLYGON_STIPPLE: return "EN_POLYGON_STIPPLE";
1120  case EN_POINT_SPRITE: return "EN_POINT_SPRITE";
1121  case EN_PROGRAM_POINT_SIZE: return "EN_PROGRAM_POINT_SIZE";
1122  case EN_ALPHA_TEST: return "EN_ALPHA_TEST";
1123  case EN_LIGHTING: return "EN_LIGHTING";
1124  case EN_COLOR_SUM: return "EN_COLOR_SUM";
1125  case EN_FOG: return "EN_FOG";
1126  case EN_NORMALIZE: return "EN_NORMALIZE";
1127  case EN_RESCALE_NORMAL: return "EN_RESCALE_NORMAL";
1128  case EN_VERTEX_PROGRAM_TWO_SIDE: return "EN_VERTEX_PROGRAM_TWO_SIDE";
1129  case EN_TEXTURE_CUBE_MAP_SEAMLESS: return "EN_TEXTURE_CUBE_MAP_SEAMLESS";
1130  case EN_CLIP_DISTANCE0: return "EN_CLIP_DISTANCE0";
1131  case EN_CLIP_DISTANCE1: return "EN_CLIP_DISTANCE1";
1132  case EN_CLIP_DISTANCE2: return "EN_CLIP_DISTANCE2";
1133  case EN_CLIP_DISTANCE3: return "EN_CLIP_DISTANCE3";
1134  case EN_CLIP_DISTANCE4: return "EN_CLIP_DISTANCE4";
1135  case EN_CLIP_DISTANCE5: return "EN_CLIP_DISTANCE5";
1136  case EN_CLIP_DISTANCE6: return "EN_CLIP_DISTANCE6";
1137  case EN_CLIP_DISTANCE7: return "EN_CLIP_DISTANCE7";
1138  case EN_SAMPLE_ALPHA_TO_COVERAGE: return "EN_SAMPLE_ALPHA_TO_COVERAGE";
1139  case EN_SAMPLE_ALPHA_TO_ONE: return "EN_SAMPLE_ALPHA_TO_ONE";
1140  case EN_SAMPLE_COVERAGE: return "EN_SAMPLE_COVERAGE";
1141  }
1142  }
1143 
1144  inline EEnable vlx_EEnable(const VLXValue& value, VLXSerializer& s)
1145  {
1146  if( value.getIdentifier() == "EN_BLEND") return EN_BLEND;
1147  if( value.getIdentifier() == "EN_CULL_FACE") return EN_CULL_FACE;
1148  if( value.getIdentifier() == "EN_DEPTH_TEST") return EN_DEPTH_TEST;
1149  if( value.getIdentifier() == "EN_STENCIL_TEST") return EN_STENCIL_TEST;
1150  if( value.getIdentifier() == "EN_DITHER") return EN_DITHER;
1151  if( value.getIdentifier() == "EN_POLYGON_OFFSET_FILL") return EN_POLYGON_OFFSET_FILL;
1152  if( value.getIdentifier() == "EN_POLYGON_OFFSET_LINE") return EN_POLYGON_OFFSET_LINE;
1153  if( value.getIdentifier() == "EN_POLYGON_OFFSET_POINT") return EN_POLYGON_OFFSET_POINT;
1154  if( value.getIdentifier() == "EN_COLOR_LOGIC_OP") return EN_COLOR_LOGIC_OP;
1155  if( value.getIdentifier() == "EN_MULTISAMPLE") return EN_MULTISAMPLE;
1156  if( value.getIdentifier() == "EN_POINT_SMOOTH") return EN_POINT_SMOOTH;
1157  if( value.getIdentifier() == "EN_LINE_SMOOTH") return EN_LINE_SMOOTH;
1158  if( value.getIdentifier() == "EN_POLYGON_SMOOTH") return EN_POLYGON_SMOOTH;
1159  if( value.getIdentifier() == "EN_LINE_STIPPLE") return EN_LINE_STIPPLE;
1160  if( value.getIdentifier() == "EN_POLYGON_STIPPLE") return EN_POLYGON_STIPPLE;
1161  if( value.getIdentifier() == "EN_POINT_SPRITE") return EN_POINT_SPRITE;
1162  if( value.getIdentifier() == "EN_PROGRAM_POINT_SIZE") return EN_PROGRAM_POINT_SIZE;
1163  if( value.getIdentifier() == "EN_ALPHA_TEST") return EN_ALPHA_TEST;
1164  if( value.getIdentifier() == "EN_LIGHTING") return EN_LIGHTING;
1165  if( value.getIdentifier() == "EN_COLOR_SUM") return EN_COLOR_SUM;
1166  if( value.getIdentifier() == "EN_FOG") return EN_FOG;
1167  if( value.getIdentifier() == "EN_NORMALIZE") return EN_NORMALIZE;
1168  if( value.getIdentifier() == "EN_RESCALE_NORMAL") return EN_RESCALE_NORMAL;
1169  if( value.getIdentifier() == "EN_VERTEX_PROGRAM_TWO_SIDE") return EN_VERTEX_PROGRAM_TWO_SIDE;
1170  if( value.getIdentifier() == "EN_TEXTURE_CUBE_MAP_SEAMLESS") return EN_TEXTURE_CUBE_MAP_SEAMLESS;
1171  if( value.getIdentifier() == "EN_CLIP_DISTANCE0") return EN_CLIP_DISTANCE0;
1172  if( value.getIdentifier() == "EN_CLIP_DISTANCE1") return EN_CLIP_DISTANCE1;
1173  if( value.getIdentifier() == "EN_CLIP_DISTANCE2") return EN_CLIP_DISTANCE2;
1174  if( value.getIdentifier() == "EN_CLIP_DISTANCE3") return EN_CLIP_DISTANCE3;
1175  if( value.getIdentifier() == "EN_CLIP_DISTANCE4") return EN_CLIP_DISTANCE4;
1176  if( value.getIdentifier() == "EN_CLIP_DISTANCE5") return EN_CLIP_DISTANCE5;
1177  if( value.getIdentifier() == "EN_CLIP_DISTANCE6") return EN_CLIP_DISTANCE6;
1178  if( value.getIdentifier() == "EN_CLIP_DISTANCE7") return EN_CLIP_DISTANCE7;
1179  if( value.getIdentifier() == "EN_SAMPLE_ALPHA_TO_COVERAGE") return EN_SAMPLE_ALPHA_TO_COVERAGE;
1180  if( value.getIdentifier() == "EN_SAMPLE_ALPHA_TO_ONE") return EN_SAMPLE_ALPHA_TO_ONE;
1181  if( value.getIdentifier() == "EN_SAMPLE_COVERAGE") return EN_SAMPLE_COVERAGE;
1182 
1183  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1185  return EN_UnknownEnable;
1186  }
1187 
1189  {
1190  if( value.getIdentifier() == "PT_POINTS") return PT_POINTS;
1191  if( value.getIdentifier() == "PT_LINES") return PT_LINES;
1192  if( value.getIdentifier() == "PT_LINE_LOOP") return PT_LINE_LOOP;
1193  if( value.getIdentifier() == "PT_LINE_STRIP") return PT_LINE_STRIP;
1194  if( value.getIdentifier() == "PT_TRIANGLES") return PT_TRIANGLES;
1195  if( value.getIdentifier() == "PT_TRIANGLE_STRIP") return PT_TRIANGLE_STRIP;
1196  if( value.getIdentifier() == "PT_TRIANGLE_FAN") return PT_TRIANGLE_FAN;
1197  if( value.getIdentifier() == "PT_QUADS") return PT_QUADS;
1198  if( value.getIdentifier() == "PT_QUAD_STRIP") return PT_QUAD_STRIP;
1199  if( value.getIdentifier() == "PT_POLYGON") return PT_POLYGON;
1200  if( value.getIdentifier() == "PT_LINES_ADJACENCY") return PT_LINES_ADJACENCY;
1201  if( value.getIdentifier() == "PT_LINE_STRIP_ADJACENCY") return PT_LINE_STRIP_ADJACENCY;
1202  if( value.getIdentifier() == "PT_TRIANGLES_ADJACENCY") return PT_TRIANGLES_ADJACENCY;
1203  if( value.getIdentifier() == "PT_TRIANGLE_STRIP_ADJACENCY") return PT_TRIANGLES_ADJACENCY;
1204  if( value.getIdentifier() == "PT_PATCHES") return PT_PATCHES;
1205  if( value.getIdentifier() == "PT_UNKNOWN") return PT_UNKNOWN;
1206 
1207  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1209  return PT_UNKNOWN;
1210  }
1211 
1212  inline const char* vlx_EPrimitiveType(EPrimitiveType type)
1213  {
1214  switch(type)
1215  {
1216  case PT_POINTS: return "PT_POINTS"; break;
1217  case PT_LINES: return "PT_LINES"; break;
1218  case PT_LINE_LOOP: return "PT_LINE_LOOP"; break;
1219  case PT_LINE_STRIP: return "PT_LINE_STRIP"; break;
1220  case PT_TRIANGLES: return "PT_TRIANGLES"; break;
1221  case PT_TRIANGLE_STRIP: return "PT_TRIANGLE_STRIP"; break;
1222  case PT_TRIANGLE_FAN: return "PT_TRIANGLE_FAN"; break;
1223  case PT_QUADS: return "PT_QUADS"; break;
1224  case PT_QUAD_STRIP: return "PT_QUAD_STRIP"; break;
1225  case PT_POLYGON: return "PT_POLYGON"; break;
1226  case PT_LINES_ADJACENCY: return "PT_LINES_ADJACENCY"; break;
1227  case PT_LINE_STRIP_ADJACENCY: return "PT_LINE_STRIP_ADJACENCY"; break;
1228  case PT_TRIANGLES_ADJACENCY: return "PT_TRIANGLES_ADJACENCY"; break;
1229  case PT_TRIANGLE_STRIP_ADJACENCY: return "PT_TRIANGLE_STRIP_ADJACENCY"; break;
1230  case PT_PATCHES: return "PT_PATCHES"; break;
1231  default:
1232  case PT_UNKNOWN: return "PT_UNKNOWN"; break;
1233  }
1234  }
1235 
1237  {
1238  if( value.getIdentifier() == "VAI_NORMAL") return VAI_NORMAL;
1239  if( value.getIdentifier() == "VAI_INTEGER") return VAI_INTEGER;
1240  if( value.getIdentifier() == "VAI_DOUBLE") return VAI_DOUBLE;
1241 
1242  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1244  return VAI_NORMAL;
1245  }
1246 
1248  {
1249  switch(type)
1250  {
1251  default:
1252  case VAI_NORMAL: return "VAI_NORMAL"; break;
1253  case VAI_INTEGER: return "VAI_INTEGER"; break;
1254  case VAI_DOUBLE: return "VAI_DOUBLE"; break;
1255  }
1256  }
1257 
1259  {
1260  if( value.getIdentifier() == "TD_TEXTURE_1D") return TD_TEXTURE_1D;
1261  if( value.getIdentifier() == "TD_TEXTURE_2D") return TD_TEXTURE_2D;
1262  if( value.getIdentifier() == "TD_TEXTURE_3D") return TD_TEXTURE_3D;
1263  if( value.getIdentifier() == "TD_TEXTURE_CUBE_MAP") return TD_TEXTURE_CUBE_MAP;
1264  if( value.getIdentifier() == "TD_TEXTURE_RECTANGLE") return TD_TEXTURE_RECTANGLE;
1265  if( value.getIdentifier() == "TD_TEXTURE_1D_ARRAY") return TD_TEXTURE_1D_ARRAY;
1266  if( value.getIdentifier() == "TD_TEXTURE_2D_ARRAY") return TD_TEXTURE_2D_ARRAY;
1267  if( value.getIdentifier() == "TD_TEXTURE_BUFFER") return TD_TEXTURE_BUFFER;
1268  if( value.getIdentifier() == "TD_TEXTURE_2D_MULTISAMPLE") return TD_TEXTURE_2D_MULTISAMPLE;
1269  if( value.getIdentifier() == "TD_TEXTURE_2D_MULTISAMPLE_ARRAY") return TD_TEXTURE_2D_MULTISAMPLE_ARRAY;
1270  if( value.getIdentifier() == "TD_TEXTURE_UNKNOWN") return TD_TEXTURE_UNKNOWN;
1271 
1272  Log::error( Say("Line %n : unknown token '%s'.\n") << value.lineNumber() << value.getIdentifier() );
1274  return TD_TEXTURE_UNKNOWN;
1275  }
1276 
1278  {
1279  switch(td)
1280  {
1281  case TD_TEXTURE_1D: return "TD_TEXTURE_1D";
1282  case TD_TEXTURE_2D: return "TD_TEXTURE_2D";
1283  case TD_TEXTURE_3D: return "TD_TEXTURE_3D";
1284  case TD_TEXTURE_CUBE_MAP: return "TD_TEXTURE_CUBE_MAP";
1285  case TD_TEXTURE_RECTANGLE: return "TD_TEXTURE_RECTANGLE";
1286  case TD_TEXTURE_1D_ARRAY: return "TD_TEXTURE_1D_ARRAY";
1287  case TD_TEXTURE_2D_ARRAY: return "TD_TEXTURE_2D_ARRAY";
1288  case TD_TEXTURE_BUFFER: return "TD_TEXTURE_BUFFER";
1289  case TD_TEXTURE_2D_MULTISAMPLE: return "TD_TEXTURE_2D_MULTISAMPLE";
1290  case TD_TEXTURE_2D_MULTISAMPLE_ARRAY: return "TD_TEXTURE_2D_MULTISAMPLE_ARRAY";
1291  case TD_TEXTURE_UNKNOWN: return "TD_TEXTURE_UNKNOWN";
1292  default:
1293  Log::error( Say("Invalid texture dimension %n\n") << td );
1294  VL_TRAP()
1295  return "TD_TEXTURE_UNKNOWN";
1296  }
1297  }
1298 
1299 }
1300 
1301 #endif
const char * vlx_ETextureFormat(ETextureFormat tf)
Definition: vlxutils.hpp:383
const T_Scalar & z() const
Definition: Vector4.hpp:103
const char * vlx_ETexParamWrap(ETexParamWrap tpw)
Definition: vlxutils.hpp:1073
If enabled, clip geometry against user-defined half space #7.
void setError(EError err)
Sets a serialization error.
const T_Scalar & e(int i, int j) const
Definition: Matrix4.hpp:660
If enabled, clip geometry against user-defined half space #1.
const T_Scalar & x() const
Definition: Vector4.hpp:101
void copyTo(T2 *ptr) const
Definition: VLXValue.hpp:123
vec3 vlx_vec3(const VLXArrayReal *arr)
Definition: vlxutils.hpp:56
void copyFrom(const T2 *ptr)
Definition: VLXValue.hpp:125
Projection matrix generated by mat4::getPerspective() or similar.
VLXValue vlx_ID(const std::string &str)
Definition: vlxutils.hpp:48
If enabled, do depth comparisons and update the depth buffer; Note that even if the depth buffer exis...
EPolygonFace
Matrix4 & setT(const Vector3< T_Scalar > &v)
Definition: Matrix4.hpp:160
A simple String formatting class.
Definition: Say.hpp:124
VLXArrayInteger * getArrayInteger()
Definition: VLXValue.hpp:443
ETexParamFilter
VLXValue vlx_Rawtext(const std::string &str)
Definition: vlxutils.hpp:52
const T_Scalar & z() const
Definition: Vector3.hpp:91
If enabled, use the current polygon stipple pattern when rendering polygons, see also PolygonStipple...
If enabled, use the current lighting parameters to compute the vertex color; Otherwise, simply associate the current color with each vertex, see also Material, LightModel, and Light.
Data will be sent using glVertexAttribIPointer(), that is, values are always left as integer values...
[GL_VERTEX_PROGRAM_POINT_SIZE/GL_PROGRAM_POINT_SIZE] If enabled, and a vertex shader is active...
If enabled, blend the incoming RGBA color values with the values in the color buffers, see also BlendFunc for more information.
If enabled, dither color components or indices before they are written to the color buffer...
const char * vlx_ETexCompareFunc(ETexCompareFunc tcf)
Definition: vlxutils.hpp:1013
const std::string & getIdentifier() const
Definition: VLXValue.hpp:471
VLXValue vlx_String(const std::string &str)
Definition: vlxutils.hpp:50
If enabled, add the secondary color value to the computed fragment color.
static void error(const String &message)
Use this function to provide information about run-time errors: file not found, out of memory...
Definition: Log.cpp:164
const char * vlx_ETexParamFilter(ETexParamFilter tpf)
Definition: vlxutils.hpp:1045
An array of 64 bits floating point numbers, can also have a tag.
Definition: VLXValue.hpp:143
If enabled, draw points with proper filtering; Otherwise, draw aliased points, see also PointSize...
const char * vlx_ETexCompareMode(ETexCompareMode tcm)
Definition: vlxutils.hpp:991
const char * vlx_EUniformType(EUniformType type)
Definition: vlxutils.hpp:867
vec2 vlx_vec2(const VLXArrayReal *arr)
Definition: vlxutils.hpp:54
If enabled, an offset is added to depth values of a polygon&#39;s fragments before the depth comparison i...
If enabled, performs alpha testing, see also AlphaFunc for more information.
EUniformType
Uniform types, see also vl::UniformInfo, vl::GLSLProgram, vl::Uniform, http://www.opengl.org/sdk/docs/man4/xhtml/glGetActiveUniform.xml.
VLXList * getList()
Definition: VLXValue.hpp:409
If enabled, and if the polygon is rendered in GL_FILL mode, an offset is added to depth values of a p...
EPrimitiveType
If enabled, clip geometry against user-defined half space #5.
std::string vlx_makeTag(const Object *obj)
Definition: vlxutils.hpp:44
Visualization Library main namespace.
Projection matrix generated by mat4::getFrustum() or similar.
A block of raw text.
Definition: VLXValue.hpp:70
ivec4 vlx_ivec4(const VLXArrayInteger *arr)
Definition: vlxutils.hpp:60
VLCORE_EXPORT VLXArray * setArray(VLXArray *)
Definition: VLXValue.cpp:224
vec4 vlx_vec4(const VLXArrayReal *arr)
Definition: vlxutils.hpp:58
uvec4 vlx_uivec4(const VLXArrayInteger *arr)
Definition: vlxutils.hpp:62
EProjectionMatrixType
#define VL_TRAP()
Definition: checks.hpp:70
EColorMaterial
const std::string & tag() const
Definition: VLXValue.hpp:62
The Vector3 class is a template class that implements a generic 3 components vector, see also vl::fvec3, vl::dvec3, vl::uvec3, vl::ivec3, vl::svec3, vl::usvec3, vl::bvec3, vl::ubvec3.
Definition: Vector3.hpp:44
const char * vlx_EPolygonFace(EPolygonFace pf)
Definition: vlxutils.hpp:335
mat4 vlx_mat4(const VLXArrayReal *arr)
Definition: vlxutils.hpp:182
Data will be sent using glVertexAttribLPointer(), that is, it will be associated with a shader attrib...
std::vector< T > & value()
Definition: VLXValue.hpp:115
Projection matrix generated by mat4::getOrtho() or similar.
The base class for all the reference counted objects.
Definition: Object.hpp:158
If enabled, each sample alpha value is replaced by the maximum representable alpha value...
ETexCompareMode
VLXValue vlx_Identifier(const std::string &str)
Definition: vlxutils.hpp:46
If enabled, clip geometry against user-defined half space #2.
If enabled, draw lines with correct filtering; Otherwise, draw aliased lines, see also LineWidth...
EType type() const
Definition: VLXValue.hpp:395
int lineNumber() const
Definition: VLXValue.hpp:54
const T_Scalar & y() const
Definition: Vector3.hpp:90
static Matrix4 getNull()
Definition: Matrix4.hpp:401
Wrapper for all VLX value types.
Definition: VLXValue.hpp:239
const T_Scalar & y() const
Definition: Vector4.hpp:102
const char * vlx_EEnable(EEnable en)
Definition: vlxutils.hpp:1099
If enabled, compute a temporary coverage value where each bit is determined by the alpha value at the...
If enabled, calculate texture coordinates for points based on texture environment and point parameter...
An array of 64 bits integers, can also have a tag.
Definition: VLXValue.hpp:132
EClearColorMode
VLXArrayReal * getArrayReal()
Definition: VLXValue.hpp:446
bool isIdentity() const
Definition: Matrix4.hpp:304
#define NULL
Definition: OpenGLDefs.hpp:81
If enabled, apply the currently selected logical operation to the incoming RGBA color and color buffe...
Data will be sent using glVertexAttribPointer(), that is, data will be converted to floating point pr...
EClearFlags
If enabled, clip geometry against user-defined half space #0.
int lineNumber() const
Definition: VLXValue.hpp:518
The Vector2 class is a template class that implements a generic 2 components vector, see also vl::fvec2, vl::dvec2, vl::uvec2, vl::ivec2, vl::svec2, vl::usvec2, vl::bvec2, vl::ubvec2.
Definition: Vector2.hpp:97
ETextureDimension
If enabled, blend a fog color into the post-texturing color, see also Fog.
Vector3< T_Scalar > getT() const
Definition: Matrix4.hpp:131
EEnable
Constant that enable/disable a specific OpenGL feature, see also Shader, Shader::enable(), Shader::disable(), Shader::isEnabled()
A simple sequence of VLXValue objects, can also have a tag.
Definition: VLXValue.hpp:633
ETextureDimension vlx_ETextureDimension(const VLXValue &value, VLXSerializer &s)
Definition: vlxutils.hpp:1258
fvec3 vec3
Defined as: &#39;typedef fvec3 vec3&#39;. See also VL_PIPELINE_PRECISION.
Definition: Vector3.hpp:269
Unknown or other projection type.
ETexParamWrap
If enabled, use multiple fragment samples in computing the final color of a pixel.
static Matrix4 & getTranslation(Matrix4 &out, const Vector3< float > &v)
Definition: Matrix4.hpp:548
T_Scalar * ptr()
Definition: Matrix4.hpp:340
If enabled, and a vertex shader is active, it specifies that the GL will choose between front and bac...
If enabled, do stencil testing and update the stencil buffer, see also StencilFunc and StencilOp...
EPrimitiveType vlx_EPrimitiveType(const VLXValue &value, VLXSerializer &s)
Definition: vlxutils.hpp:1188
static Matrix4 & getScaling(Matrix4 &out, const Vector3< float > &v)
Definition: Matrix4.hpp:584
const char * vlx_EProjectionMatrixType(EProjectionMatrixType pt)
Definition: vlxutils.hpp:257
ETexCompareFunc
const T_Scalar & x() const
Definition: Vector3.hpp:89
If enabled, clip geometry against user-defined half space #6.
bool vlx_isTranslation(const mat4 &mat)
Definition: vlxutils.hpp:131
const char * vlx_EColorMaterial(EColorMaterial cm)
Definition: vlxutils.hpp:357
const T_Scalar & x() const
Definition: Vector2.hpp:132
const char * vlx_EClearColorMode(EClearColorMode ccm)
Definition: vlxutils.hpp:281
std::vector< VLXValue > & value()
Definition: VLXValue.hpp:651
If enabled, cubemap textures are sampled such that when linearly sampling from the border between two...
If enabled, the fragment&#39;s coverage is ANDed with the temporary coverage value; If GL_SAMPLE_COVERAGE...
ETextureFormat
Definition: vlnamespace.hpp:45
For internal use only.
If enabled, draw polygons with proper filtering; Otherwise, draw aliased polygons; For correct antial...
If enabled, normals are scaled by a scaling factor derived from the modelview matrix; vl::EN_RESCALE_...
const T_Scalar & y() const
Definition: Vector2.hpp:133
EDepthTextureMode
static Matrix4 getLookAt(const Vector3< float > &eye, const Vector3< float > &at, const Vector3< float > &up)
Definition: Matrix4.hpp:783
Translates an arbitrary set of vl::Object (and subclasses) into VLB and VLT format.
If enabled, normal vectors are scaled to unit length after transformation, see also vl::EN_RESCALE_NO...
If enabled, and if the polygon is rendered in GL_LINE mode, an offset is added to depth values of a p...
#define VL_CHECK(expr)
Definition: checks.hpp:73
const char * vlx_EDepthTextureMode(EDepthTextureMode dtm)
Definition: vlxutils.hpp:967
EVertexAttribInterpretation
Specifies how the data of a VertexAttribInfo is sent to the OpenGL driver, see also http://www...
bool vlx_isScaling(const mat4 &mat)
Definition: vlxutils.hpp:138
If enabled, clip geometry against user-defined half space #3.
VLXValue vlx_toValue(const std::vector< int > &vec)
Definition: vlxutils.hpp:64
If enabled, use the current line stipple pattern when drawing lines, see also LineStipple.
const char * vlx_EClearFlags(EClearFlags cf)
Definition: vlxutils.hpp:303
const T_Scalar & w() const
Definition: Vector4.hpp:104
EVertexAttribInterpretation vlx_EVertexAttribInterpretation(const VLXValue &value, VLXSerializer &s)
Definition: vlxutils.hpp:1236
If enabled, cull polygons based on their winding in window coordinates, see also CullFace.
If enabled, clip geometry against user-defined half space #4.