32 #ifndef vlxutils_INCLUDE_ONCE 33 #define vlxutils_INCLUDE_ONCE 44 inline std::string
vlx_makeTag(
const vl::Object* obj) {
return std::string(
"<") + obj->classType().name() +
">"; }
78 arr->
value().resize(4);
90 arr->
value().resize(4);
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();
114 arr->
value().resize(3);
115 arr->
value()[0] = vec.
x();
116 arr->
value()[1] = vec.
y();
117 arr->
value()[2] = vec.
z();
125 arr->
value().resize(2);
126 arr->
value()[0] = vec.
x();
127 arr->
value()[1] = vec.
y();
193 for(
size_t i=0; i<list->
value().size(); ++i)
203 if (arr->
tag() ==
"<Translate>")
209 if (arr->
tag() ==
"<Scale>")
215 if (arr->
tag() ==
"<Matrix>")
221 if (arr->
tag() ==
"<LookAt>")
224 if (arr->
value().size() != 9)
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];
244 if (arr->
tag() ==
"<Skew>")
1104 return "EN_UnknownEnable";
1295 return "TD_TEXTURE_UNKNOWN";
vl::EPrimitiveType vlx_EPrimitiveType(const VLXValue &value, VLXSerializer &s)
const T_Scalar & z() const
If enabled, clip geometry against user-defined half space #7.
const T_Scalar & e(int i, int j) const
If enabled, clip geometry against user-defined half space #1.
const T_Scalar & x() const
Wrapper for all VLX value types.
Projection matrix generated by mat4::getPerspective() or similar.
If enabled, do depth comparisons and update the depth buffer; Note that even if the depth buffer exis...
Matrix4 & setT(const Vector3< T_Scalar > &v)
vl::vec4 vlx_vec4(const VLXArrayReal *arr)
const char * vlx_ETextureFormat(vl::ETextureFormat tf)
A simple String formatting class.
std::string vlx_makeTag(const vl::Object *obj)
const T_Scalar & z() const
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...
bool vlx_isTranslation(const vl::mat4 &mat)
If enabled, blend the incoming RGBA color values with the values in the color buffers, see also BlendFunc for more information.
VLXValue vlx_String(const std::string &str)
const char * vlx_EPolygonFace(vl::EPolygonFace pf)
void copyTo(T2 *ptr) const
If enabled, dither color components or indices before they are written to the color buffer...
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...
const char * vlx_EClearColorMode(vl::EClearColorMode ccm)
void copyFrom(const T2 *ptr)
An array of 64 bits floating point numbers, can also have a tag.
The Vector4 class is a template class that implements a generic 4 components vector, see also vl::fvec4, vl::dvec4, vl::uvec4, vl::ivec4, vl::svec4, vl::usvec4, vl::bvec4, vl::ubvec4.
vl::vec3 vlx_vec3(const VLXArrayReal *arr)
const char * vlx_ETexCompareMode(vl::ETexCompareMode tcm)
const char * vlx_EProjectionMatrixType(vl::EProjectionMatrixType pt)
If enabled, draw points with proper filtering; Otherwise, draw aliased points, see also PointSize...
If enabled, an offset is added to depth values of a polygon'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.
If enabled, and if the polygon is rendered in GL_FILL mode, an offset is added to depth values of a p...
If enabled, clip geometry against user-defined half space #5.
std::vector< VLXValue > & value()
Projection matrix generated by mat4::getFrustum() or similar.
const char * vlx_EClearFlags(vl::EClearFlags cf)
const char * vlx_EEnable(vl::EEnable en)
const char * vlx_ETexParamFilter(vl::ETexParamFilter tpf)
void setError(EError err)
Sets a serialization error.
const char * vlx_EDepthTextureMode(vl::EDepthTextureMode dtm)
const char * vlx_ETexCompareFunc(vl::ETexCompareFunc tcf)
Data will be sent using glVertexAttribLPointer(), that is, it will be associated with a shader attrib...
Projection matrix generated by mat4::getOrtho() or similar.
A simple sequence of VLXValue objects, can also have a tag.
The base class for all the reference counted objects.
If enabled, each sample alpha value is replaced by the maximum representable alpha value...
vl::uvec4 vlx_uivec4(const VLXArrayInteger *arr)
const std::string & tag() const
vl::ivec4 vlx_ivec4(const VLXArrayInteger *arr)
If enabled, clip geometry against user-defined half space #2.
If enabled, draw lines with correct filtering; Otherwise, draw aliased lines, see also LineWidth...
const T_Scalar & y() const
VLXValue vlx_Identifier(const std::string &str)
const T_Scalar & y() const
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...
The Matrix4 class is a template class that implements a generic 4x4 matrix, see also vl::dmat4...
If enabled, apply the currently selected logical operation to the incoming RGBA color and color buffe...
VLX_EXPORT VLXArray * setArray(VLXArray *)
Data will be sent using glVertexAttribPointer(), that is, data will be converted to floating point pr...
If enabled, clip geometry against user-defined half space #0.
An array of 64 bits integers, can also have a tag.
VLXValue vlx_ID(const std::string &str)
If enabled, blend a fog color into the post-texturing color, see also Fog.
Vector3< T_Scalar > getT() const
std::vector< T > & value()
EEnable
Constant that enable/disable a specific OpenGL feature, see also Shader, Shader::enable(), Shader::disable(), Shader::isEnabled()
vl::vec2 vlx_vec2(const VLXArrayReal *arr)
VLXValue vlx_Rawtext(const std::string &str)
Unknown or other projection type.
Translates an arbitrary set of vl::Object (and subclasses) into VLB and VLT format.
If enabled, use multiple fragment samples in computing the final color of a pixel.
static Matrix4 & getTranslation(Matrix4 &out, const Vector3< float > &v)
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...
vl::EVertexAttribInterpretation vlx_EVertexAttribInterpretation(const VLXValue &value, VLXSerializer &s)
static Matrix4 & getScaling(Matrix4 &out, const Vector3< float > &v)
const T_Scalar & x() const
If enabled, clip geometry against user-defined half space #6.
const char * vlx_EColorMaterial(vl::EColorMaterial cm)
vl::mat4 vlx_mat4(const VLXArrayReal *arr)
const T_Scalar & x() const
vl::ETextureDimension vlx_ETextureDimension(const VLXValue &value, VLXSerializer &s)
const char * vlx_EUniformType(vl::EUniformType type)
VLXArrayInteger * getArrayInteger()
If enabled, cubemap textures are sampled such that when linearly sampling from the border between two...
If enabled, the fragment's coverage is ANDed with the temporary coverage value; If GL_SAMPLE_COVERAGE...
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
VLXValue vlx_toValue(const std::vector< int > &vec)
static Matrix4 getLookAt(const Vector3< float > &eye, const Vector3< float > &at, const Vector3< float > &up)
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...
EVertexAttribInterpretation
Specifies how the data of a VertexAttribInfo is sent to the OpenGL driver, see also http://www...
VLXArrayReal * getArrayReal()
const char * vlx_ETexParamWrap(vl::ETexParamWrap tpw)
bool vlx_isScaling(const vl::mat4 &mat)
If enabled, clip geometry against user-defined half space #3.
const std::string & getIdentifier() const
If enabled, use the current line stipple pattern when drawing lines, see also LineStipple.
const T_Scalar & w() const
If enabled, cull polygons based on their winding in window coordinates, see also CullFace.
If enabled, clip geometry against user-defined half space #4.