|
GL Studio C++ Runtime API
|
#include <gls_state_manager_interface.h>
Public Types | |
| enum | { GLS_TEXTURE_MAP_MODE_MODULATE = 0x2100 , GLS_TEXTURE_MAP_MODE_DECAL = 0x2101 , GLS_TEXTURE_MAP_MODE_BLEND = 0x0BE2 , GLS_TEXTURE_MAP_MODE_REPLACE = 0x1E01 } |
| Supported texture mapping modes. | |
| enum | { MATRIX_STACK_DEPTH = 64u , PROJECTION_STACK_DEPTH = 64u , TEXTURE_STACK_DEPTH = 64u , CUSTOM_SHADER_PROGRAM_STACK_DEPTH = 64u } |
Public Member Functions | |
| virtual void | AlphaBlendFuncSeparate (GLenum srcColor, GLenum dstColor, GLenum srcAlpha, GLenum dstAlpha)=0 |
| virtual void | SetDefaultAlphaBlendFunc ()=0 |
| Sets the default blend function for GL Studio. | |
| virtual void | PushAlphaBlendFunc ()=0 |
| Pushes the current alpha blend func onto an internal stack. Can restore the pushed alpha blend func by calling PopAlphaBlendFunc. More... | |
| virtual void | PopAlphaBlendFunc ()=0 |
| Pops the previously pushed alpha blend func from the stack and restores its state to the opengl context. More... | |
| virtual void | AlphaBlendFunc (GLenum src, GLenum dst)=0 |
| virtual void | SetDefaultState (bool forceResetUnmanagedState=false)=0 |
| virtual void | LoadProjectionMatrixf (const GlsMatrixType &m)=0 |
| virtual void | LoadProjectionIdentityMatrix ()=0 |
| virtual void | PushProjectionMatrix ()=0 |
| virtual void | PopProjectionMatrix ()=0 |
| virtual void | LoadModelViewMatrixf (const GlsMatrixType &m)=0 |
| virtual void | LoadModelViewIdentityMatrix ()=0 |
| Set the current model view matrix to the identity matrix. | |
| virtual void | MultModelViewMatrixf (const GlsMatrixType &m, const GLboolean pushMatrix)=0 |
| virtual void | TranslateModelViewMatrixf (GLfloat x, GLfloat y, GLfloat z)=0 |
| virtual void | PushModelViewMatrix ()=0 |
| virtual void | PopModelViewMatrix ()=0 |
| virtual void | LoadTextureMatrixf (const GlsMatrixType &m)=0 |
| virtual void | LoadTextureIdentityMatrix ()=0 |
| Sets the current texture matrix to the identity matrix. | |
| virtual void | ScaleTextureMatrixf (GLfloat x, GLfloat y, GLfloat z)=0 |
| virtual void | TranslateTextureMatrixf (GLfloat x, GLfloat y, GLfloat z)=0 |
| virtual void | PushTextureMatrix ()=0 |
| virtual void | PopTextureMatrix ()=0 |
| virtual void | AlphaBlendEnabled (bool val)=0 |
| virtual void | AlphaTestEnabled (bool val)=0 |
| virtual void | AlphaTestFunc (GLenum func, GLfloat val)=0 |
| virtual void | DepthTestEnabled (bool val)=0 |
| virtual void | DepthMaskEnabled (bool val)=0 |
| virtual bool | IsDepthMaskEnabled ()=0 |
| virtual void | DepthFunc (GLenum func)=0 |
| virtual void | DepthRange (GLfloat min, GLfloat max)=0 |
| virtual void | BackfaceCullingEnabled (bool val)=0 |
| virtual void | Texture2DEnabled (bool val)=0 |
| virtual void | ActiveTexture (GLenum textureUnit)=0 |
| virtual void | BindTexture (IFontImage *texture)=0 |
| virtual void | DeleteTexture (IFontImage *texture)=0 |
| virtual void | SetTextureWrapS (GLenum mode)=0 |
| virtual void | SetTextureWrapT (GLenum mode)=0 |
| virtual void | SetTextureEnvMode (GLenum mode)=0 |
| virtual void | SetTextureBlendColor (GLfloat *color)=0 |
| virtual void | SetTextureMinFilter (GLenum mode)=0 |
| virtual void | SetTextureMagFilter (GLenum mode)=0 |
| virtual void | BindIndexBuffer (unsigned int handle)=0 |
| virtual void | BindVertexBuffer (unsigned int handle)=0 |
| virtual void | VertexArrayEnabled (bool val)=0 |
| virtual void | NormalArrayEnabled (bool val)=0 |
| virtual void | TextureArrayEnabled (bool val)=0 |
| virtual void | ColorArrayEnabled (bool val)=0 |
| virtual void | VertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)=0 |
| virtual void | TexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)=0 |
| virtual void | NormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer)=0 |
| virtual void | ColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer)=0 |
| virtual void | LineSmoothEnabled (bool val)=0 |
| virtual void | LineWidth (float width)=0 |
| virtual float | GetMaximumLineWidth ()=0 |
| virtual void | PointSize (float size)=0 |
| virtual void | LineStipple (unsigned short pattern, unsigned int multiplier)=0 |
| virtual void | SetColor (const glsColor &color)=0 |
| virtual void | Normal3f (float x, float y, float z)=0 |
| virtual void | AmbientMaterial (const glsColor &color)=0 |
| virtual void | DiffuseMaterial (const glsColor &color)=0 |
| virtual void | SpecularMaterial (const glsColor &color)=0 |
| virtual void | EmissionMaterial (const glsColor &color)=0 |
| virtual void | ShininessMaterial (float shininess)=0 |
| virtual void | LightingEnabled (bool val)=0 |
| virtual void | GouraudShadingEnabled (bool val)=0 |
| virtual bool | IsLightingEnabled ()=0 |
| virtual bool | IsLightSourceEnabled (unsigned int index)=0 |
| virtual unsigned int | GetMaxNumLights ()=0 |
| virtual void | SetLightEnabled (unsigned int index, bool enabled)=0 |
| virtual void | SetLightAmbientColor (unsigned int index, GLfloat *color)=0 |
| virtual void | GetLightAmbientColor (unsigned int index, GLfloat *color)=0 |
| virtual void | SetLightDiffuseColor (unsigned int index, GLfloat *color)=0 |
| virtual void | GetLightDiffuseColor (unsigned int index, GLfloat *color)=0 |
| virtual void | SetLightSpecularColor (unsigned int index, GLfloat *color)=0 |
| virtual void | GetLightSpecularColor (unsigned int index, GLfloat *color)=0 |
| virtual void | SetLightPosition (unsigned int index, GLfloat *position)=0 |
| virtual void | GetLightPosition (unsigned int index, GLfloat *position)=0 |
| virtual void | SetSpotlightDirection (unsigned int index, GLfloat *direction)=0 |
| virtual void | GetSpotlightDirection (unsigned int index, GLfloat *direction)=0 |
| virtual void | SetSpotlightCutoff (unsigned int index, GLfloat cutoff)=0 |
| virtual GLfloat | GetSpotlightCutoff (unsigned int index)=0 |
| virtual void | SetSpotlightExponent (unsigned int index, GLfloat exponent)=0 |
| virtual GLfloat | GetSpotlightExponent (unsigned int index)=0 |
| virtual void | SetLightAttenuation (unsigned int index, GLfloat constant, GLfloat linear, GLfloat quadratic)=0 |
| virtual void | GetLightAttenuation (unsigned int index, GLfloat &constant, GLfloat &linear, GLfloat &quadratic)=0 |
| virtual unsigned int | GetMaxClipPlanes ()=0 |
| virtual void | ClipPlanef (unsigned int index, float *equation)=0 |
| virtual void | GetClipPlanef (unsigned int index, float *equation)=0 |
| virtual void | EnableClipPlane (unsigned int index)=0 |
| virtual void | DisableClipPlane (unsigned int index)=0 |
| virtual bool | IsClipPlaneEnabled (unsigned int index)=0 |
| virtual void | DrawArrays (const GLenum mode, const GLint first, const GLsizei count)=0 |
| virtual void | DrawElements (const GLenum mode, const GLsizei count, const GLenum type, const GLvoid *indices)=0 |
Protected Member Functions | |
| IGlsStateManager () | |
| virtual | ~IGlsStateManager () |
Friends | |
| class | ScopedPtr< IGlsStateManager > |
The interface to a state manager that manages the GL Studio runtime library's use of the OpenGL context, minimizing unnecessary state changes
| anonymous enum |
|
inlineprotected |
default ctor
|
inlineprotectedvirtual |
dtor is protected but virtual so that users cannot delete instances of it, but ScopedPtr can inside GlsGlobals.
|
pure virtual |
Notifies OpenGL the active texture. All subsequent texture state calls will affect the active texture
| textureUnit | the texture unit to make active. |
|
pure virtual |
Updates OpenGL to enable or disable alpha blending.
| val | If true, then alpha blend is enabled. Otherwise, it'll disable alpha blend. |
|
pure virtual |
Wrapper for glBlendFunc. Parameters are equivalent to glBlendFunc.
| src | Function to use for source color. |
| dst | Function to use for destination color. |
Implemented in IGlsStateManagerES20.
|
pure virtual |
Wrapper for glBlendFuncSeparate if supported, or glBlendFunc (ignoring the last two parameters) if glBlendFuncSeparate is not supported. Parameters are equivalent to glBlendFuncSeparate.
| srcColor | Function to use for source color. |
| dstColor | Function to use for destination color. |
| srcAlpha | Function to use for source alpha. |
| dstAlpha | Function to use for destination alpha. |
Implemented in IGlsStateManagerES20.
|
pure virtual |
Enables or disables the shader alpha test. When testing, the fragment shaders will check the transparency of the fragment. If it's nearly invisible, the shader instructions will be discarded and will not update the buffer.
| val | If true, then the shader alpha test is enabled. Otherwise, it's disabled. |
|
pure virtual |
Specifies the alpha comparison function. Fragments may be discarded depending on the outcome of this function comparison.
| func | Determines the type of comparison to conduct. |
| val | Determines the threshold when the comparison passes or not. |
|
pure virtual |
Updates the ambient material parameter to the new color.
| color | The new color to use for the ambient material parameter. |
|
pure virtual |
Notifies OpenGL to enable or disable backface culling. If enabled, triangles facing away from the camera are not rendered.
| val | If true, then backface culling is enabled. Otherwise, it's disabled. |
|
pure virtual |
Binds the vertex array buffer to an OpenGL context.
| handle | The handle to map to the OpenGL context. |
|
pure virtual |
Binds the given texture to the current active texture unit.
| texture | the texture to bind to the active texture unit. |
|
pure virtual |
Binds the vertex attribute array buffer to an OpenGL context.
| handle | The handle to map to the OpenGL context. |
|
pure virtual |
Updates the equation of a clip plane. The equation is set in local space and retrieved in eye space. The retrieved value is different from the set value unless the modelview matrix is identity.
| [in] | index | Determines which plane to access. This must be less than the GetMaxClipPlanes. |
| [in] | equation | The new equation that defines the plane. Four floats are used to define the plane. This is in local space. |
|
pure virtual |
Enables or disables the vertex shader color attribute.
| val | If true, then the shader color attribute is enabled. Otherwise, it's disabled. |
|
pure virtual |
Update the vertex shader's color attribute with the new parameters.
| size | The number of components per generic vertex attribute. |
| type | The data type of each component in the array. |
| stride | The byte offset between consecutive generic vertex attributes. |
| pointer | A pointer to the first component of the first generic vertex attribute in the array. |
|
pure virtual |
Unbinds and deletes the specified texture.
| texture | the texture to unbind from OpenGL and delete. |
|
pure virtual |
Determines the comparison function to use when performing a depth test.
| func | Determines the type of comparison to conduct when performing a depth test. |
|
pure virtual |
Notifies OpenGL to enable or disable writing to the depth buffer.
| val | If true, then writing to the depth buffer is enabled. Otherwise, it'll be disabled. |
|
pure virtual |
Specifies a linear mapping of the normalized depth coordinates.
| min | The mapping of the near clipping plane. |
| max | The mapping of the far clipping plane. |
|
pure virtual |
Updates OpenGL to enable or disable the depth test. The depth test will determine if fragments behind other surfaces should be discarded or not.
| val | If true, then the depth test is enabled. Otherwise, it'll disable the depth test. |
|
pure virtual |
Updates the diffuse material parameter to the new color.
| color | The new color to use for the diffuse material parameter. |
|
pure virtual |
Deactivates the plane associated with the specified index.
| [in] | index | Determines which plane to disable. |
|
pure virtual |
Equivalent to glDrawArrays call.
| mode | Primitive mode to draw ( GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, or GL_TRIANGLES ). |
| first | Starting index in the enabled arrays. |
| count | The number of indices to be rendered. |
|
pure virtual |
Equivalent to glDrawElements call.
| mode | Primitive mode to draw ( GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, or GL_TRIANGLES ). |
| count | The number of elements to be rendered. |
| type | Specifies the type of the values in indices ( GL_UNSIGNED_BYTE or GL_UNSIGNED_SHORT ). |
| indices | Pointer to the location where the indices are stored else an offset in bytes into the the currently bound element array buffer. |
|
pure virtual |
Updates the emission material parameter to the new color.
| color | The new color to use for the emission material parameter. |
|
pure virtual |
Activates the plane associated with the specified index.
| [in] | index | Determines which plane to enable. |
|
pure virtual |
Retrieves the clip plane equation. This is retrieved in eye space, which may be different from the setter.
| [in] | index | Determines which plane to access. |
| [out] | equation | The resulting equation that defines the associated plane is copied to this parameter. There must be four floats. |
|
pure virtual |
Retrieves the ambient color parameter from the specified light source.
| [in] | index | Determines which light source to access. |
| [out] | color | Copies the ambient color value to this parameter. |
|
pure virtual |
Retrieves the light attenuation factors from the specified light.
| [in] | index | Determines which light source to access. |
| [out] | constant | The constant attenuation factor is written to this parameter. |
| [out] | linear | The linear attenuation factor is written to this parameter. |
| [out] | quadratic | The quadratic attenuation factor is written to this parameter. |
|
pure virtual |
Retrieves the diffuse color parameter from the specified light source.
| [in] | index | Determines which light source to access. |
| [out] | color | Copies the diffuse color value to this parameter. |
|
pure virtual |
Retrieves the position of the specified light source. This is retrieved in eye space. The retrieved value is different than the set value unless the modelview matrix is identity.
| [in] | index | Determines which light source to access. |
| [out] | position | Copies the position value to this parameter. This is in eye space. |
|
pure virtual |
Retrieves the specular color parameter from the specified light source.
| [in] | index | Determines which light source to access. |
| [out] | color | Copies the specular color value to this parameter. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
| [in] | index | Determines which light source to access. |
|
pure virtual |
Retrieves the light direction of the specified light source. This is retrieved in eye space. The retrieved value is different than the set value unless the modelview matrix is identity.
| [in] | index | Determines which light source to access. |
| [out] | direction | Copies the light direction value to this parameter. This is in eye space. |
|
pure virtual |
| [in] | index | Determines which light source to access. |
|
pure virtual |
Determines if the shading model should be flat or smooth. When smooth, the colors between vertices are interpolated. If flat, then only one color from the vertex is chosen for the surface.
| val | If true, then it'll use smooth shading. Otherwise, it'll use flat shading. |
|
pure virtual |
| [in] | index | Determines which plane to check. |
|
pure virtual |
|
pure virtual |
|
pure virtual |
| index | Index to the light source to check. |
|
pure virtual |
Enables or disables lighting.
| val | If true, then lighting is enabled. |
|
pure virtual |
Enables or disables antialiasing for lines. If enabled, jagged edges will be smoothed out.
| val | If true, then lines are antialiased. |
|
pure virtual |
Specifies the render pattern for lines.
| pattern | Determines which fragments of a line will be drawn. The default pattern is all 1's. |
| multiplier | Specifies the 'scale' for each bit in the line pattern. For example, if the multiplier is 2, then the pattern stretches out twice as large. This value is clamped to the range 1 to 256. |
|
pure virtual |
Determines the width of aliased and antialiased lines. If antialiasing is disabled, the actual width is determined by rounding the nearest integer. The width may be clamped. See GetMaximumLineWidth.
| width | The number of pixels to fill across the line. This must be a positive value. |
|
pure virtual |
Load the given matrix on to the top of the matrix stack.
| m | The matrix to push onto the stack. |
|
pure virtual |
Set the current projection matrix to the identity matrix.
|
pure virtual |
Load the given matrix into the projection matrix.
| m | The matrix to load onto the projeciton matrix. |
|
pure virtual |
Load the given matrix to the top of the texture matrix stack.
| m | The matrix to load to the top of the texture matrix stack. |
|
pure virtual |
Multiply (and optionally push) the top of the stack by the given matrix such that if t is the top of the matrix then t=t*m . If pushMatrix is true then the matrix stack is pushed before the multiplication.
| m | matrix to multiply by. |
| pushMatrix | true to push the matrix stack before multiplying. |
|
pure virtual |
Sets the current normal vector. Passing in a unit length vector is not required.
| x | The x-axis of the normal vector. |
| y | The y-axis of the normal vector. |
| z | The z-axis of the normal vector. |
|
pure virtual |
Enables or disables the vertex shader normal attribute.
| val | If true, then the shader normal attribute is enabled. Otherwise, it's disabled. |
|
pure virtual |
Update the vertex shader's normal attribute with the new parameters.
| type | The data type of each component in the array. |
| stride | The byte offset between consecutive generic vertex attributes. |
| pointer | A pointer to the first component of the first generic vertex attribute in the array. |
|
pure virtual |
Specifies the diameter of rasterized points.
| size | Determines the point diameter. This value must be a positive number. |
|
pure virtual |
Pops the previously pushed alpha blend func from the stack and restores its state to the opengl context.
Implemented in IGlsStateManagerES20.
|
pure virtual |
Pop the matrix stack.
|
pure virtual |
Removes a projection matrix from the top of the stack.
|
pure virtual |
Pop the texture matrix stack.
|
pure virtual |
Pushes the current alpha blend func onto an internal stack. Can restore the pushed alpha blend func by calling PopAlphaBlendFunc.
Implemented in IGlsStateManagerES20.
|
pure virtual |
Push the matrix stack.
|
pure virtual |
Adds a projection matrix to the top of the stack.
|
pure virtual |
Push the texture matrix stack.
|
pure virtual |
Apply a scale factor to the top of the texture matrix stack.
| x | The x-coordinate of the scale vector. |
| y | The y-coordinate of the scale vector. |
| z | The z-coordinate of the scale vector. |
|
pure virtual |
Updates the color for subsequent drawing commands when rendering primitives.
| color | Updates the current color with this specified color. |
|
pure virtual |
Initializes the state manager to its default states and then sends that state to the OpenGL context
| forceResetUnmanagedState | Force the reset of all GL state, even state unmanaged by GL Studio. |
|
pure virtual |
Sets the ambient color parameter for the specified light source.
| [in] | index | Determines which light source should have their ambient color updated. |
| [in] | color | The new color to use. There must be four floats for the RGBA. |
|
pure virtual |
Sets the light attenuation factor parameters for the specified light source.
| [in] | index | Determines which light source should have their attenuation factor updated. |
| [in] | constant | Set the new constant factor that is independent from the light distance. |
| [in] | linear | Sets the new linear attenuation factor. |
| [in] | quadratic | Sets the new quadratic attenuation factor. |
|
pure virtual |
Sets the diffuse color parameter for the specified light source.
| [in] | index | Determines which light source should have their diffuse color updated. |
| [in] | color | The new color to use. There must be four floats for the RGBA. |
|
pure virtual |
Sets the specified light source to be active or not.
| index | Index to the light source to update. |
| enabled | If true, then the light source will be activated. Otherwise, it'll be deactivated. |
|
pure virtual |
Sets the light position. This is set in local space.
| [in] | index | Determines which light source should have their position updated. |
| [in] | position | The new position in local space. There must be three floats for the XYZ. |
|
pure virtual |
Sets the specular color parameter for the specified light source.
| [in] | index | Determines which light source should have their specular color updated. |
| [in] | color | The new color to use. There must be four floats for the RGBA. |
|
pure virtual |
Specifies the maximum spread angle of the light source.
| [in] | index | Determines which light source to access. |
| [in] | cutoff | The maximum spread angle. Only values within 90 and 180 are accepted where 180 results in uniform light distribution. |
|
pure virtual |
Specifies the direction of the light. This is retrieved in eye space. The retrieved value is different than the set value unless the modelview matrix is identity.
| [in] | index | Determines which light source to access. |
| [in] | direction | The new light direction in local space. There must be three floats for the XYZ. |
|
pure virtual |
Updates the light source's intensity distribution of the light.
| [in] | index | Determines which light source to access. |
| [in] | exponent | Specifies the intensity distribution of the light where higher values results in a more focused light source, and 0 resulting in a more uniformed light distribution. |
|
pure virtual |
Updates the shader to blend the specified color.
| color | the new color to blend against. |
|
pure virtual |
Equivalent to calling glTexEnv. This updates the texture environment mode to determine shader functions should run.
| mode | The type of feature to run. For GLES 2.0, the valid values are GLS_TEXTURE_MAP_MODE_MODULATE, GLS_TEXTURE_MAP_MODE_REPLACE, GLS_TEXTURE_MAP_MODE_BLEND, and GLS_TEXTURE_MAP_MODE_DECAL. Otherwise mode may refer to one of six texture functions: GL_ADD, GL_MODULATE, GL_DECAL, GL_BLEND, GL_REPLACE, or GL_COMBINE. Any other value will disable this feature. |
|
pure virtual |
Specifies the active texture's magnification function whenever the pixel being texture maps to an area less than or equal to one texture element.
| mode | The function to use when scaling up. Valid values are GL_NEAREST, GL_LINEAR. |
|
pure virtual |
Specifies the active texture's minification function whenever the pixel being textured maps to an area greater than one texture element.
| mode | The function to use when scaling down. Valid values are GL_NEAREST, GL_LINEAR GL_NEAREST_MIPMAP_NEAREST, GL_LINEAR_MIPMAP_NEAREST, GL_NEAREST_MIPMAP_LINEAR, GL_LINEAR_MIPMAP_LINEAR. |
|
pure virtual |
Determines the horizontal wrapping behavior of the active texture.
| mode | The type of wrapping behavior. Common ones are clamping and repeat. |
|
pure virtual |
Determines the vertical wrapping behavior of the active texture.
| mode | The type of wrapping behavior. Common ones are clamping and repeat. |
|
pure virtual |
Updates the shininess material parameter to the new value.
| shininess | The new shiny value to use for the material. The higher the value, the shinier the material becomes. |
|
pure virtual |
Updates the specular material parameter to the new color.
| color | The new color to use for the specular material parameter. |
|
pure virtual |
Update the vertex shader's texture coordinates attribute with the new parameters.
| size | The number of components per generic vertex attribute. |
| type | The data type of each component in the array. |
| stride | The byte offset between consecutive generic vertex attributes. |
| pointer | A pointer to the first component of the first generic vertex attribute in the array. |
|
pure virtual |
Enables or disables textures. When enabled, shaders can leverage the diffuse map.
| val | If true, then textures are enabled. Otherwise, it's disabled. |
|
pure virtual |
Enables or disables the vertex shader texture coordinates attribute.
| val | If true, then the shader texture coordinates are enabled. Otherwise, it's disabled. |
|
pure virtual |
Apply a translation to the top of the model view matrix stack.
| x | The x-coordinate of the translation vector. |
| y | The y-coordinate of the translation vector. |
| z | The z-coordinate of the translation vector. |
|
pure virtual |
Apply a translation to the top of the texture matrix stack.
| x | The x-coordinate of the translation vector. |
| y | The y-coordinate of the translation vector. |
| z | The z-coordinate of the translation vector. |
|
pure virtual |
Enables or disables the vertex shader position attribute.
| val | If true, then the shader position attribute is enabled. Otherwise, it's disabled. |
|
pure virtual |
Update the vertex shader's position attribute with the new parameters.
| size | The number of components per generic vertex attribute. |
| type | The data type of each component in the array. |
| stride | The byte offset between consecutive generic vertex attributes. |
| pointer | A pointer to the first component of the first generic vertex attribute in the array. |