OGLplus (0.52.0) a C++ wrapper for OpenGL

drawing.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_CONTEXT_DRAWING_1201040722_HPP
14 #define OGLPLUS_CONTEXT_DRAWING_1201040722_HPP
15 
16 #include <oglplus/glfunc.hpp>
17 #include <oglplus/error/object.hpp>
20 #include <oglplus/data_type.hpp>
21 #include <oglplus/object/name.hpp>
22 
23 namespace oglplus {
24 namespace context {
25 
27 
30 class Drawing
31 {
32 public:
34 
40  static void DrawArrays(
41  PrimitiveType primitive,
42  GLint first,
43  GLsizei count
44  )
45  {
46  OGLPLUS_GLFUNC(DrawArrays)(GLenum(primitive), first, count);
47  OGLPLUS_CHECK(
48  DrawArrays,
49  Error,
50  EnumParam(primitive)
51  );
52  }
53 
54 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
55 
64  PrimitiveType primitive,
65  GLint first,
66  GLsizei count,
67  GLsizei inst_count,
68  GLsizei base_instance
69  )
70  {
71  OGLPLUS_GLFUNC(DrawArraysInstancedBaseInstance)(
72  GLenum(primitive),
73  first,
74  count,
75  inst_count,
76  base_instance
77  );
78  OGLPLUS_CHECK(
80  Error,
81  EnumParam(primitive)
82  );
83  }
84 #endif
85 
86 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_1
87 
95  static void DrawArraysInstanced(
96  PrimitiveType primitive,
97  GLint first,
98  GLsizei count,
99  GLsizei inst_count
100  )
101  {
102  OGLPLUS_GLFUNC(DrawArraysInstanced)(
103  GLenum(primitive),
104  first,
105  count,
106  inst_count
107  );
108  OGLPLUS_CHECK(
110  Error,
111  EnumParam(primitive)
112  );
113  }
114 #endif
115 
116 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_draw_indirect
117 
125  static void DrawArraysIndirect(
126  PrimitiveType primitive,
127  const void* indirect = nullptr
128  )
129  {
130  OGLPLUS_GLFUNC(DrawArraysIndirect)(
131  GLenum(primitive),
132  indirect
133  );
134  OGLPLUS_CHECK(
136  Error,
137  EnumParam(primitive)
138  );
139  }
140 #endif
141 
142 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
143 
152  static void MultiDrawArrays(
153  PrimitiveType primitive,
154  const GLint* first,
155  const GLsizei* count,
156  GLsizei primcount
157  )
158  {
159  OGLPLUS_GLFUNC(MultiDrawArrays)(
160  GLenum(primitive),
161  const_cast<GLint*>(first), //TODO: cast because of GLEW
162  const_cast<GLsizei*>(count), // remove when GLEW fixed
163  primcount
164  );
165  OGLPLUS_CHECK(
167  Error,
168  EnumParam(primitive)
169  );
170  }
171 #endif
172 
173 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3 || GL_ARB_multi_draw_indirect
174 
183  PrimitiveType primitive,
184  GLsizei draw_count,
185  GLsizei stride = 0,
186  const void* indirect = nullptr
187  )
188  {
189  OGLPLUS_GLFUNC(MultiDrawArraysIndirect)(
190  GLenum(primitive),
191  indirect,
192  draw_count,
193  stride
194  );
195  OGLPLUS_CHECK(
197  Error,
198  EnumParam(primitive)
199  );
200  }
201 #endif
202 
204 
210  static void DrawElements(
211  PrimitiveType primitive,
212  GLsizei count,
213  DataType data_type
214  )
215  {
216  OGLPLUS_GLFUNC(DrawElements)(
217  GLenum(primitive),
218  count,
219  GLenum(data_type),
220  nullptr
221  );
222  OGLPLUS_CHECK(
223  DrawElements,
224  Error,
225  EnumParam(primitive)
226  );
227  }
228 
230 
236  template <typename T>
237  static typename std::enable_if<IsGLDataType<T>::value, void>::type
239  PrimitiveType primitive,
240  GLsizei count,
241  const T* indices
242  )
243  {
244  OGLPLUS_GLFUNC(DrawElements)(
245  GLenum(primitive),
246  count,
247  GLenum(GetDataType<T>()),
248  indices
249  );
250  OGLPLUS_CHECK(
251  DrawElements,
252  Error,
253  EnumParam(primitive)
254  );
255  }
256 
258 
265  PrimitiveType primitive,
266  GLsizei count,
267  DataType data_type,
268  GLsizei instance_count
269  )
270  {
271  OGLPLUS_GLFUNC(DrawElementsInstanced)(
272  GLenum(primitive),
273  count,
274  GLenum(data_type),
275  nullptr,
276  instance_count
277  );
278  OGLPLUS_CHECK(
280  Error,
281  EnumParam(primitive)
282  );
283  }
284 
286 
292  template <typename T>
293  static typename std::enable_if<IsGLDataType<T>::value, void>::type
295  PrimitiveType primitive,
296  GLsizei count,
297  const T* indices,
298  GLsizei instance_count
299  )
300  {
301  OGLPLUS_GLFUNC(DrawElementsInstanced)(
302  GLenum(primitive),
303  count,
304  GLenum(GetDataType<T>()),
305  indices,
306  instance_count
307  );
308  OGLPLUS_CHECK(
310  Error,
311  EnumParam(primitive)
312  );
313  }
314 
315 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
316 
325  PrimitiveType primitive,
326  GLsizei count,
327  DataType data_type,
328  GLsizei inst_count,
329  GLuint base_instance
330  )
331  {
332  OGLPLUS_GLFUNC(DrawElementsInstancedBaseInstance)(
333  GLenum(primitive),
334  count,
335  GLenum(data_type),
336  nullptr,
337  inst_count,
338  base_instance
339  );
340  OGLPLUS_CHECK(
342  Error,
343  EnumParam(primitive)
344  );
345  }
346 
348 
355  template <typename T>
356  static typename std::enable_if<IsGLDataType<T>::value, void>::type
358  PrimitiveType primitive,
359  GLsizei count,
360  const T* indices,
361  GLsizei inst_count,
362  GLuint base_instance
363  )
364  {
365  OGLPLUS_GLFUNC(DrawElementsInstancedBaseInstance)(
366  GLenum(primitive),
367  count,
368  GLenum(GetDataType<T>()),
369  indices,
370  inst_count,
371  base_instance
372  );
373  OGLPLUS_CHECK(
375  Error,
376  EnumParam(primitive)
377  );
378  }
379 #endif
380 
381 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_0
382 
389  static void MultiDrawElements(
390  PrimitiveType primitive,
391  const GLsizei* count,
392  DataType data_type,
393  GLsizei draw_count
394  )
395  {
396  OGLPLUS_GLFUNC(MultiDrawElements)(
397  GLenum(primitive),
398  const_cast<GLsizei*>(count), //TODO: cast because of GLEW
399  GLenum(data_type),
400  nullptr,
401  draw_count
402  );
403  OGLPLUS_CHECK(
405  Error,
406  EnumParam(primitive)
407  );
408  }
409 
411 
417  template <typename T>
418  static typename std::enable_if<IsGLDataType<T>::value, void>::type
420  PrimitiveType primitive,
421  const GLsizei* count,
422  T* const * indices,
423  GLsizei draw_count
424  )
425  {
426  OGLPLUS_GLFUNC(MultiDrawElements)(
427  GLenum(primitive),
428  const_cast<GLsizei*>(count), //TODO: cast because of GLEW
429  GLenum(GetDataType<T>()),
430  indices,
431  draw_count
432  );
433  OGLPLUS_CHECK(
435  Error,
436  EnumParam(primitive)
437  );
438  }
439 #endif
440 
442 
448  static void DrawRangeElements(
449  PrimitiveType primitive,
450  GLuint start,
451  GLuint end,
452  GLsizei count,
453  DataType data_type
454  )
455  {
456  OGLPLUS_GLFUNC(DrawRangeElements)(
457  GLenum(primitive),
458  start,
459  end,
460  count,
461  GLenum(data_type),
462  nullptr
463  );
464  OGLPLUS_CHECK(
466  Error,
467  EnumParam(primitive)
468  );
469  }
470 
472 
478  template <typename T>
479  static typename std::enable_if<IsGLDataType<T>::value, void>::type
481  PrimitiveType primitive,
482  GLuint start,
483  GLuint end,
484  GLsizei count,
485  const T* indices
486  )
487  {
488  OGLPLUS_GLFUNC(DrawRangeElements)(
489  GLenum(primitive),
490  start,
491  end,
492  count,
493  GLenum(GetDataType<T>()),
494  indices
495  );
496  OGLPLUS_CHECK(
498  Error,
499  EnumParam(primitive)
500  );
501  }
502 
503 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_draw_indirect
504 
512  static void DrawElementsIndirect(
513  PrimitiveType primitive,
514  DataType data_type,
515  const void* indirect = nullptr
516  )
517  {
518  OGLPLUS_GLFUNC(DrawElementsIndirect)(
519  GLenum(primitive),
520  GLenum(data_type),
521  indirect
522  );
523  OGLPLUS_CHECK(
525  Error,
526  EnumParam(primitive)
527  );
528  }
529 #endif
530 
531 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_3
532 
541  PrimitiveType primitive,
542  DataType data_type,
543  GLsizei draw_count,
544  GLsizei stride = 0,
545  const void* indirect = nullptr
546  )
547  {
548  OGLPLUS_GLFUNC(MultiDrawElementsIndirect)(
549  GLenum(primitive),
550  GLenum(data_type),
551  indirect,
552  draw_count,
553  stride
554  );
555  OGLPLUS_CHECK(
557  Error,
558  EnumParam(primitive)
559  );
560  }
561 #endif
562 
563 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_2 || GL_ARB_draw_elements_base_vertex
564 
573  PrimitiveType primitive,
574  GLsizei count,
575  DataType data_type,
576  GLint base_vertex
577  )
578  {
579  OGLPLUS_GLFUNC(DrawElementsBaseVertex)(
580  GLenum(primitive),
581  count,
582  GLenum(data_type),
583  nullptr,
584  base_vertex
585  );
586  OGLPLUS_CHECK(
588  Error,
589  EnumParam(primitive)
590  );
591  }
593 
601  template <typename T>
602  static typename std::enable_if<IsGLDataType<T>::value, void>::type
604  PrimitiveType primitive,
605  GLsizei count,
606  const T* indices,
607  GLint base_vertex
608  )
609  {
610  OGLPLUS_GLFUNC(DrawElementsBaseVertex)(
611  GLenum(primitive),
612  count,
613  GLenum(GetDataType<T>()),
614  indices,
615  base_vertex
616  );
617  OGLPLUS_CHECK(
619  Error,
620  EnumParam(primitive)
621  );
622  }
623 
625 
633  PrimitiveType primitive,
634  GLuint start,
635  GLuint end,
636  GLsizei count,
637  DataType data_type,
638  GLint base_vertex
639  )
640  {
641  OGLPLUS_GLFUNC(DrawRangeElementsBaseVertex)(
642  GLenum(primitive),
643  start,
644  end,
645  count,
646  GLenum(data_type),
647  nullptr,
648  base_vertex
649  );
650  OGLPLUS_CHECK(
652  Error,
653  EnumParam(primitive)
654  );
655  }
656 
658 
665  template <typename T>
666  static typename std::enable_if<IsGLDataType<T>::value, void>::type
668  PrimitiveType primitive,
669  GLuint start,
670  GLuint end,
671  GLsizei count,
672  const T* indices,
673  GLint base_vertex
674  )
675  {
676  OGLPLUS_GLFUNC(DrawRangeElementsBaseVertex)(
677  GLenum(primitive),
678  start,
679  end,
680  count,
681  GLenum(GetDataType<T>()),
682  indices,
683  base_vertex
684  );
685  OGLPLUS_CHECK(
687  Error,
688  EnumParam(primitive)
689  );
690  }
691 
693 
701  PrimitiveType primitive,
702  GLsizei count,
703  DataType data_type,
704  GLsizei inst_count,
705  GLint base_vertex
706  )
707  {
708  OGLPLUS_GLFUNC(DrawElementsInstancedBaseVertex)(
709  GLenum(primitive),
710  count,
711  GLenum(data_type),
712  nullptr,
713  inst_count,
714  base_vertex
715  );
716  OGLPLUS_CHECK(
718  Error,
719  EnumParam(primitive)
720  );
721  }
722 
724 
731  template <typename T>
732  static typename std::enable_if<IsGLDataType<T>::value, void>::type
734  PrimitiveType primitive,
735  GLsizei count,
736  const T* indices,
737  GLsizei inst_count,
738  GLint base_vertex
739  )
740  {
741  OGLPLUS_GLFUNC(DrawElementsInstancedBaseVertex)(
742  GLenum(primitive),
743  count,
744  GLenum(GetDataType<T>()),
745  indices,
746  inst_count,
747  base_vertex
748  );
749  OGLPLUS_CHECK(
751  Error,
752  EnumParam(primitive)
753  );
754  }
755 
757 
765  PrimitiveType primitive,
766  const GLsizei* count,
767  DataType data_type,
768  GLsizei draw_count,
769  const GLint* base_vertex
770  )
771  {
772  OGLPLUS_GLFUNC(MultiDrawElementsBaseVertex)(
773  GLenum(primitive),
774  const_cast<GLsizei*>(count), //TODO remove const_cast
775  GLenum(data_type),
776  nullptr,
777  draw_count,
778  const_cast<GLint*>(base_vertex) //TODO remove const_cast
779  );
780  OGLPLUS_CHECK(
782  Error,
783  EnumParam(primitive)
784  );
785  }
786 
788 
795  template <typename T>
796  static typename std::enable_if<IsGLDataType<T>::value, void>::type
798  PrimitiveType primitive,
799  const GLsizei* count,
800  T* const * indices,
801  GLsizei draw_count,
802  const GLint* base_vertex
803  )
804  {
805  OGLPLUS_GLFUNC(MultiDrawElementsBaseVertex)(
806  GLenum(primitive),
807  const_cast<GLsizei*>(count), //TODO remove const_cast
808  GLenum(GetDataType<T>()),
809  indices,
810  draw_count,
811  const_cast<GLint*>(base_vertex) //TODO remove const_cast
812  );
813  OGLPLUS_CHECK(
815  Error,
816  EnumParam(primitive)
817  );
818  }
819 #endif
820 
821 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_2
822 
831  PrimitiveType primitive,
832  GLsizei count,
833  DataType data_type,
834  GLsizei inst_count,
835  GLint base_vertex,
836  GLuint base_instance
837  )
838  {
840  GLenum(primitive),
841  count,
842  GLenum(data_type),
843  nullptr,
844  inst_count,
845  base_vertex,
846  base_instance
847  );
848  OGLPLUS_CHECK(
850  Error,
851  EnumParam(primitive)
852  );
853  }
854 
856 
863  template <typename T>
864  static typename std::enable_if<IsGLDataType<T>::value, void>::type
866  PrimitiveType primitive,
867  GLsizei count,
868  const T* indices,
869  GLsizei inst_count,
870  GLint base_vertex,
871  GLuint base_instance
872  )
873  {
875  GLenum(primitive),
876  count,
877  GLenum(GetDataType<T>()),
878  indices,
879  inst_count,
880  base_vertex,
881  base_instance
882  );
883  OGLPLUS_CHECK(
885  Error,
886  EnumParam(primitive)
887  );
888  }
889 #endif
890 
891 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_4_0 || GL_ARB_transform_feedback2
892  static void DrawTransformFeedback(
893  PrimitiveType primitive,
895  )
896  {
897  OGLPLUS_GLFUNC(DrawTransformFeedback)(
898  GLenum(primitive),
899  GetGLName(xfb)
900  );
901  OGLPLUS_CHECK(
902  DrawTransformFeedback,
903  ObjectError,
904  Object(xfb).
905  EnumParam(primitive)
906  );
907  }
908 #endif
909 
910 #if OGLPLUS_DOCUMENTATION_ONLY || GL_NV_draw_texture
911  static void DrawTexture(
912  TextureName texture,
913  SamplerName sampler,
914  GLfloat x0,
915  GLfloat y0,
916  GLfloat x1,
917  GLfloat y1,
918  GLfloat z,
919  GLfloat s0,
920  GLfloat t0,
921  GLfloat s1,
922  GLfloat t1
923  )
924  {
925  OGLPLUS_GLFUNC(DrawTextureNV)(
926  GetGLName(texture),
927  GetGLName(sampler),
928  x0, y0,
929  x1, y1,
930  z,
931  s0, t0,
932  s1, t1
933  );
934  OGLPLUS_CHECK(
935  DrawTextureNV,
936  ObjectPairError,
937  Subject(sampler).
938  Object(texture)
939  );
940  }
941 
942  static void DrawTexture(
943  TextureName texture,
944  GLfloat x0,
945  GLfloat y0,
946  GLfloat x1,
947  GLfloat y1,
948  GLfloat z
949  )
950  {
951  DrawTexture(
952  texture,
953  SamplerName(),
954  x0, y0,
955  x1, y1,
956  z,
957  0, 0,
958  1, 1
959  );
960  }
961 #endif
962 
963 #if OGLPLUS_DOCUMENTATION_ONLY || GL_VERSION_3_1
964 
972  static void PrimitiveRestartIndex(GLuint index)
973  {
974  OGLPLUS_GLFUNC(PrimitiveRestartIndex)(index);
975  OGLPLUS_CHECK(
977  Error,
978  Index(index)
979  );
980  }
981 #endif
982 
983 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_tessellation_shader || GL_VERSION_4_0
984  static void PatchParameter(
985  oglplus::PatchParameter parameter,
986  GLint value
987  )
988  {
989  OGLPLUS_GLFUNC(PatchParameteri)(GLenum(parameter), value);
990  OGLPLUS_CHECK(
991  PatchParameteri,
992  Error,
993  EnumParam(parameter)
994  );
995  }
996 #endif
997 };
998 
999 } // namespace context
1000 } // namespace oglplus
1001 
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

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Mon Sep 22 2014 by Doxygen (version 1.8.6).