13 #ifndef OGLPLUS_CONTEXT_DRAWING_1201040722_HPP
14 #define OGLPLUS_CONTEXT_DRAWING_1201040722_HPP
46 OGLPLUS_GLFUNC(
DrawArrays)(GLenum(primitive), first, count);
54 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
86 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_1
116 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_draw_indirect
127 const void* indirect =
nullptr
142 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
155 const GLsizei* count,
161 const_cast<GLint*
>(first),
162 const_cast<GLsizei*>(count),
173 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3 || GL_ARB_multi_draw_indirect
186 const void* indirect =
nullptr
236 template <
typename T>
237 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
247 GLenum(GetDataType<T>()),
268 GLsizei instance_count
292 template <
typename T>
293 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
298 GLsizei instance_count
304 GLenum(GetDataType<T>()),
315 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
355 template <
typename T>
356 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
368 GLenum(GetDataType<T>()),
381 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
391 const GLsizei* count,
398 const_cast<GLsizei*
>(count),
417 template <
typename T>
418 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
421 const GLsizei* count,
428 const_cast<GLsizei*
>(count),
429 GLenum(GetDataType<T>()),
478 template <
typename T>
479 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
493 GLenum(GetDataType<T>()),
503 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_draw_indirect
515 const void* indirect =
nullptr
531 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
545 const void* indirect =
nullptr
563 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2 || GL_ARB_draw_elements_base_vertex
601 template <
typename T>
602 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
613 GLenum(GetDataType<T>()),
665 template <
typename T>
666 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
681 GLenum(GetDataType<T>()),
731 template <
typename T>
732 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
744 GLenum(GetDataType<T>()),
766 const GLsizei* count,
769 const GLint* base_vertex
774 const_cast<GLsizei*
>(count),
778 const_cast<GLint*
>(base_vertex)
795 template <
typename T>
796 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
799 const GLsizei* count,
802 const GLint* base_vertex
807 const_cast<GLsizei*
>(count),
808 GLenum(GetDataType<T>()),
811 const_cast<GLint*>(base_vertex)
821 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
863 template <
typename T>
864 static typename std::enable_if<IsGLDataType<T>::value,
void>::type
877 GLenum(GetDataType<T>()),
891 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_transform_feedback2
892 static void DrawTransformFeedback(
897 OGLPLUS_GLFUNC(DrawTransformFeedback)(
902 DrawTransformFeedback,
910 #if OGLPLUS_DOCUMENTATION_ONLY || GL_NV_draw_texture
911 static void DrawTexture(
925 OGLPLUS_GLFUNC(DrawTextureNV)(
942 static void DrawTexture(
963 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_1
983 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_tessellation_shader || GL_VERSION_4_0
989 OGLPLUS_GLFUNC(PatchParameteri)(GLenum(parameter), value);
1002 #endif // include guard
static void DrawElementsInstancedBaseVertexBaseInstance(PrimitiveType primitive, GLsizei count, DataType data_type, GLsizei inst_count, GLint base_vertex, GLuint base_instance)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:830
static void DrawArrays(PrimitiveType primitive, GLint first, GLsizei count)
Draws count of primitives from the bound array buffers.
Definition: drawing.hpp:40
static void DrawArraysInstancedBaseInstance(PrimitiveType primitive, GLint first, GLsizei count, GLsizei inst_count, GLsizei base_instance)
Draws count of primitives from the bound array buffers.
Definition: drawing.hpp:63
static void DrawElementsInstanced(PrimitiveType primitive, GLsizei count, DataType data_type, GLsizei instance_count)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:264
OpenGL patch parameters enumeration.
PatchParameter
Enumeration of patch parameters.
Definition: patch_parameter.hpp:27
DataType
OpenGL data type enumeration.
Definition: data_type.hpp:34
static void MultiDrawElementsBaseVertex(PrimitiveType primitive, const GLsizei *count, DataType data_type, GLsizei draw_count, const GLint *base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:764
PrimitiveType
Primitive type enumeration.
Definition: primitive_type.hpp:29
static void DrawRangeElements(PrimitiveType primitive, GLuint start, GLuint end, GLsizei count, DataType data_type)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:448
Declaration of OGLplus object-related error.
static void DrawArraysInstanced(PrimitiveType primitive, GLint first, GLsizei count, GLsizei inst_count)
Draws count of primitives from the bound array buffers.
Definition: drawing.hpp:95
static std::enable_if< IsGLDataType< T >::value, void >::type DrawRangeElements(PrimitiveType primitive, GLuint start, GLuint end, GLsizei count, const T *indices)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:480
OpenGL primitive type-related declarations.
Wrapper for primitive drawing operations.
Definition: drawing.hpp:30
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElementsInstancedBaseInstance(PrimitiveType primitive, GLsizei count, const T *indices, GLsizei inst_count, GLuint base_instance)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:357
GLuint GetGLName(ObjectName< ObjTag > named)
Returns the GLuint OpenGL name assigned to named object.
Definition: name.hpp:38
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElementsInstancedBaseVertexBaseInstance(PrimitiveType primitive, GLsizei count, const T *indices, GLsizei inst_count, GLint base_vertex, GLuint base_instance)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:865
static void DrawArraysIndirect(PrimitiveType primitive, const void *indirect=nullptr)
Draws primitives from an indirect buffer.
Definition: drawing.hpp:125
static void DrawElements(PrimitiveType primitive, GLsizei count, DataType data_type)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:210
Helper macro for optional checking of availability of GL function.
static void DrawElementsInstancedBaseInstance(PrimitiveType primitive, GLsizei count, DataType data_type, GLsizei inst_count, GLuint base_instance)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:324
static void MultiDrawArraysIndirect(PrimitiveType primitive, GLsizei draw_count, GLsizei stride=0, const void *indirect=nullptr)
Draws multiple sets of primitives from an indirect buffer.
Definition: drawing.hpp:182
Data type-related declarations.
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElementsInstancedBaseVertex(PrimitiveType primitive, GLsizei count, const T *indices, GLsizei inst_count, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:733
static void DrawRangeElementsBaseVertex(PrimitiveType primitive, GLuint start, GLuint end, GLsizei count, DataType data_type, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:632
static void MultiDrawArrays(PrimitiveType primitive, const GLint *first, const GLsizei *count, GLsizei primcount)
Draws primcount ranges of primitives from the bound array buffers.
Definition: drawing.hpp:152
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElementsBaseVertex(PrimitiveType primitive, GLsizei count, const T *indices, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:603
Exception class for general OpenGL errors.
Definition: basic.hpp:43
static void DrawElementsInstancedBaseVertex(PrimitiveType primitive, GLsizei count, DataType data_type, GLsizei inst_count, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:700
Exception class for GL object-related errors.
Definition: object.hpp:24
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElementsInstanced(PrimitiveType primitive, GLsizei count, const T *indices, GLsizei instance_count)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:294
static void MultiDrawElementsIndirect(PrimitiveType primitive, DataType data_type, GLsizei draw_count, GLsizei stride=0, const void *indirect=nullptr)
Draws sequences of primitives from the bound element array buffers.
Definition: drawing.hpp:540
static void PrimitiveRestartIndex(GLuint index)
Sets the primitive restart index.
Definition: drawing.hpp:972
static std::enable_if< IsGLDataType< T >::value, void >::type MultiDrawElementsBaseVertex(PrimitiveType primitive, const GLsizei *count, T *const *indices, GLsizei draw_count, const GLint *base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:797
static void DrawElementsBaseVertex(PrimitiveType primitive, GLsizei count, DataType data_type, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:572
Base class for OpenGL "named" objects.
static std::enable_if< IsGLDataType< T >::value, void >::type DrawElements(PrimitiveType primitive, GLsizei count, const T *indices)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:238
static std::enable_if< IsGLDataType< T >::value, void >::type MultiDrawElements(PrimitiveType primitive, const GLsizei *count, T *const *indices, GLsizei draw_count)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:419
A common template for "named" objects like textures, buffers, etc.
Definition: fwd.hpp:136
static void MultiDrawElements(PrimitiveType primitive, const GLsizei *count, DataType data_type, GLsizei draw_count)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:389
static void DrawElementsIndirect(PrimitiveType primitive, DataType data_type, const void *indirect=nullptr)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:512
static std::enable_if< IsGLDataType< T >::value, void >::type DrawRangeElementsBaseVertex(PrimitiveType primitive, GLuint start, GLuint end, GLsizei count, const T *indices, GLint base_vertex)
Draws a sequence of primitives from the bound element array buffers.
Definition: drawing.hpp:667