#include
<oglplus/vertex_attrib.hpp>
template <> class ProgVarLocOps<tag::VertexAttrib> { public: static void BindLocation( ProgramName program, VertexAttribSlot location, StrCRef identifier ); static GLint GetLocation( ProgramName program, StrCRef identifier, bool active_only ); static VertexAttribSlot GetLocation( ProgramName program, StrCRef identifier ); static bool QueryActiveLocation( ProgramName program, StrCRef identifier, VertexAttribSlot& location ); static bool QueryCommonLocation( const Sequence<ProgramName>& programs, StrCRef identifier, VertexAttribSlot& location ); static VertexAttribSlot GetCommonLocation( const Sequence<ProgramName>& programs, StrCRef identifier ); };
Binds the vertex attribute location. See |
||||
Finds the location of the input vertex attribute specified by |
||||
Equivalent to |
||||
Queries the vertex attribute location, returns |
||||
Allows to query the vertex attribute
|
||||
Returns vertex attribute location in multiple programs if it's consistent.
Finds the location of the input vertex attribute specified by |
template <> class ProgVarCommonOps<tag::VertexAttrib> : public ProgVarLoc<tag::VertexAttrib> { public: void Bind(StrCRef identifier); #if GL_VERSION_3_3 void Divisor(GLuint divisor) const; #endif };
Indirectly inherits from ProgVarCommonOps |
|
Binds the vertex attribute specified by |
|
Sets the vertex attribute divisor See |
template <typename OpsTag, typename T> class ProgVarGetSetOps<OpsTag, tag::VertexAttrib, T> : public ProgVarCommonOps<tag::VertexAttrib> { public: void Set(T value); void SetValue(T value); void TrySet(T value); };
Sets the vertex attribute value. See |
|
Sets the vertex attribute value if it is active. See |
template <typename T> using VertexAttrib = ProgVar< tag::ImplicitSel, tag::Uniform, tag::NoTypecheck, T >;
|
class VertexArrayAttrib : public ProgVarCommonOps<tag::VertexAttrib> { public: VertexArrayAttrib(VertexAttribSlot location); VertexArrayAttrib(ProgramName program, VertexAttribSlot location); VertexArrayAttrib(ProgramName program, StrCRef identifier); const VertexArrayAttrib& Setup( GLint values_per_vertex, DataType data_type ) const; const VertexArrayAttrib& Setup( GLint values_per_vertex, DataType data_type ) const; template <typename T> const VertexArrayAttrib& Setup(GLuint n = 1) const; const VertexArrayAttrib& Pointer( GLint values_per_vertex, DataType data_type, Boolean normalized, SizeType stride, const void* pointer ) const; const VertexArrayAttrib& IPointer( GLuint values_per_vertex, DataType data_type, SizeType stride, const void* pointer ) const; #if GL_VERSION_4_2 || GL_ARB_vertex_attrib_64bit const VertexArrayAttrib& LPointer( GLuint values_per_vertex, DataType data_type, SizeType stride, const void* pointer ) const; #endif #if GL_VERSION_4_3 || GL_ARB_vertex_attrib_binding const VertexArrayAttrib& Format( GLint values_per_vertex, DataType data_type, Boolean normalized, GLuint relative_offset ) const; const VertexArrayAttrib& IFormat( GLint values_per_vertex, DataType data_type, GLuint relative_offset ) const; const VertexArrayAttrib& LFormat( GLint values_per_vertex, DataType data_type, GLuint relative_offset ) const; #endif const VertexArrayAttrib& Enable(void) const; const VertexArrayAttrib& Disable(void) const; }; template <std::size_t N> VertexArrayAttrib operator | ( ProgramName program, const GLchar (&identifier)[N] ); VertexArrayAttrib operator | ( ProgramName program, GLuint location );
Sets up the properties of
|
||||
Sets up the properties of |
||||
See |
||||
Enables |
||||
Disables |