OGLplus (0.52.0) a C++ wrapper for OpenGL

ARB_compatibility.hpp
Go to the documentation of this file.
1 
12 #pragma once
13 #ifndef OGLPLUS_EXT_ARB_COMPATIBILITY_1203031902_HPP
14 #define OGLPLUS_EXT_ARB_COMPATIBILITY_1203031902_HPP
15 
16 #include <oglplus/extension.hpp>
17 #include <oglplus/texture_unit.hpp>
21 
22 #include <oglplus/math/matrix.hpp>
23 
24 namespace oglplus {
25 
26 #if OGLPLUS_DOCUMENTATION_ONLY || GL_ARB_compatibility
27 
35 {
36 public:
37  OGLPLUS_EXTENSION_CLASS(ARB, compatibility)
38 
39 
40 
45  {
46  OGLPLUS_GLFUNC(Begin)(GLenum(mode));
47  }
48 
50 
54  static void End(void)
55  {
56  OGLPLUS_GLFUNC(End)();
57  OGLPLUS_VERIFY_SIMPLE(End);
58  }
59 
61 
66  {
67  OGLPLUS_GLFUNC(PushAttrib)(GLbitfield(attr_groups));
68  OGLPLUS_VERIFY_SIMPLE(PushAttrib);
69  }
70 
72 
76  static void PushClientAttrib(
78  )
79  {
80  OGLPLUS_GLFUNC(PushClientAttrib)(GLbitfield(attrib_groups));
81  OGLPLUS_VERIFY_SIMPLE(PushClientAttrib);
82  }
83 
85 
89  static void PopAttrib(void)
90  {
91  OGLPLUS_GLFUNC(PopAttrib)();
92  OGLPLUS_VERIFY_SIMPLE(PopAttrib);
93  }
94 
96 
100  static void PopClientAttrib(void)
101  {
102  OGLPLUS_GLFUNC(PopClientAttrib)();
103  OGLPLUS_VERIFY_SIMPLE(PopClientAttrib);
104  }
105 
107 
112  {
113  OGLPLUS_GLFUNC(MatrixMode)(GLenum(mode));
114  OGLPLUS_VERIFY_SIMPLE(MatrixMode);
115  }
116 
118 
122  static void LoadIdentity(void)
123  {
124  OGLPLUS_GLFUNC(LoadIdentity)();
125  OGLPLUS_VERIFY_SIMPLE(LoadIdentity);
126  }
127 
129 
133  static void LoadMatrix(const Mat4f& matrix)
134  {
135  OGLPLUS_GLFUNC(LoadMatrixf)(Data(Transposed(matrix)));
136  OGLPLUS_VERIFY_SIMPLE(LoadMatrixf);
137  }
138 
140 
144  static void LoadMatrix(const Mat4d& matrix)
145  {
146  OGLPLUS_GLFUNC(LoadMatrixd)(Data(Transposed(matrix)));
147  OGLPLUS_VERIFY_SIMPLE(LoadMatrixd);
148  }
149 
150 private:
151  static void Vertex_(GLint x, GLint y)
152  {
153  OGLPLUS_GLFUNC(Vertex2i)(x, y);
154  }
155 
156  static void Vertex_(GLint x, GLint y, GLint z)
157  {
158  OGLPLUS_GLFUNC(Vertex3i)(x, y, z);
159  }
160 
161  static void Vertex_(GLint x, GLint y, GLint z, GLint w)
162  {
163  OGLPLUS_GLFUNC(Vertex4i)(x, y, z, w);
164  }
165 
166  static void Vertex_(GLfloat x, GLfloat y)
167  {
168  OGLPLUS_GLFUNC(Vertex2f)(x, y);
169  }
170 
171  static void Vertex_(GLfloat x, GLfloat y, GLfloat z)
172  {
173  OGLPLUS_GLFUNC(Vertex3f)(x, y, z);
174  }
175 
176  static void Vertex_(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
177  {
178  OGLPLUS_GLFUNC(Vertex4f)(x, y, z, w);
179  }
180 
181  static void Vertex_(GLdouble x, GLdouble y)
182  {
183  OGLPLUS_GLFUNC(Vertex2d)(x, y);
184  }
185 
186  static void Vertex_(GLdouble x, GLdouble y, GLdouble z)
187  {
188  OGLPLUS_GLFUNC(Vertex3d)(x, y, z);
189  }
190 
191  static void Vertex_(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
192  {
193  OGLPLUS_GLFUNC(Vertex4d)(x, y, z, w);
194  }
195 public:
197 
201  template <typename Type>
202  static void Vertex(Type x, Type y)
203  {
204  Vertex_(x, y);
205  }
206 
208 
212  template <typename Type>
213  static void Vertex(Type x, Type y, Type z)
214  {
215  Vertex_(x, y, z);
216  }
217 
219 
223  template <typename Type>
224  static void Vertex(Type x, Type y, Type z, Type w)
225  {
226  Vertex_(x, y, z, w);
227  }
228 
229 private:
230  static void TexCoord_(GLint s)
231  {
232  OGLPLUS_GLFUNC(TexCoord1i)(s);
233  }
234 
235  static void TexCoord_(GLint s, GLint t)
236  {
237  OGLPLUS_GLFUNC(TexCoord2i)(s, t);
238  }
239 
240  static void TexCoord_(GLint s, GLint t, GLint r)
241  {
242  OGLPLUS_GLFUNC(TexCoord3i)(s, t, r);
243  }
244 
245  static void TexCoord_(GLint s, GLint t, GLint r, GLint q)
246  {
247  OGLPLUS_GLFUNC(TexCoord4i)(s, t, r, q);
248  }
249 
250  static void TexCoord_(GLfloat s)
251  {
252  OGLPLUS_GLFUNC(TexCoord1f)(s);
253  }
254 
255  static void TexCoord_(GLfloat s, GLfloat t)
256  {
257  OGLPLUS_GLFUNC(TexCoord2f)(s, t);
258  }
259 
260  static void TexCoord_(GLfloat s, GLfloat t, GLfloat r)
261  {
262  OGLPLUS_GLFUNC(TexCoord3f)(s, t, r);
263  }
264 
265  static void TexCoord_(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
266  {
267  OGLPLUS_GLFUNC(TexCoord4f)(s, t, r, q);
268  }
269 
270  static void TexCoord_(GLdouble s)
271  {
272  OGLPLUS_GLFUNC(TexCoord1d)(s);
273  }
274 
275  static void TexCoord_(GLdouble s, GLdouble t)
276  {
277  OGLPLUS_GLFUNC(TexCoord2d)(s, t);
278  }
279 
280  static void TexCoord_(GLdouble s, GLdouble t, GLdouble r)
281  {
282  OGLPLUS_GLFUNC(TexCoord3d)(s, t, r);
283  }
284 
285  static void TexCoord_(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
286  {
287  OGLPLUS_GLFUNC(TexCoord4d)(s, t, r, q);
288  }
289 public:
291 
295  template <typename Type>
296  static void TexCoord(Type s)
297  {
298  TexCoord_(s);
299  }
300 
302 
306  template <typename Type>
307  static void TexCoord(Type s, Type t)
308  {
309  TexCoord_(s, t);
310  }
311 
313 
317  template <typename Type>
318  static void TexCoord(Type s, Type t, Type r)
319  {
320  TexCoord_(s, t, r);
321  }
322 
324 
328  template <typename Type>
329  static void TexCoord(Type s, Type t, Type r, Type q)
330  {
331  TexCoord_(s, t, r, q);
332  }
333 
334 private:
335  static void MultiTexCoord_(GLenum tex_unit, GLint s)
336  {
337  OGLPLUS_GLFUNC(MultiTexCoord1i)(tex_unit, s);
338  }
339 
340  static void MultiTexCoord_(GLenum tex_unit, GLint s, GLint t)
341  {
342  OGLPLUS_GLFUNC(MultiTexCoord2i)(tex_unit, s, t);
343  }
344 
345  static void MultiTexCoord_(
346  GLenum tex_unit,
347  GLint s,
348  GLint t,
349  GLint r
350  )
351  {
352  OGLPLUS_GLFUNC(MultiTexCoord3i)(tex_unit, s, t, r);
353  }
354 
355  static void MultiTexCoord_(
356  GLenum tex_unit,
357  GLint s,
358  GLint t,
359  GLint r,
360  GLint q
361  )
362  {
363  OGLPLUS_GLFUNC(MultiTexCoord4i)(tex_unit, s, t, r, q);
364  }
365 
366  static void MultiTexCoord_(GLenum tex_unit, GLfloat s)
367  {
368  OGLPLUS_GLFUNC(MultiTexCoord1f)(tex_unit, s);
369  }
370 
371  static void MultiTexCoord_(GLenum tex_unit, GLfloat s, GLfloat t)
372  {
373  OGLPLUS_GLFUNC(MultiTexCoord2f)(tex_unit, s, t);
374  }
375 
376  static void MultiTexCoord_(
377  GLenum tex_unit,
378  GLfloat s,
379  GLfloat t,
380  GLfloat r
381  )
382  {
383  OGLPLUS_GLFUNC(MultiTexCoord3f)(tex_unit, s, t, r);
384  }
385 
386  static void MultiTexCoord_(
387  GLenum tex_unit,
388  GLfloat s,
389  GLfloat t,
390  GLfloat r,
391  GLfloat q
392  )
393  {
394  OGLPLUS_GLFUNC(MultiTexCoord4f)(tex_unit, s, t, r, q);
395  }
396 
397  static void MultiTexCoord_(GLenum tex_unit, GLdouble s)
398  {
399  OGLPLUS_GLFUNC(MultiTexCoord1d)(tex_unit, s);
400  }
401 
402  static void MultiTexCoord_(GLenum tex_unit, GLdouble s, GLdouble t)
403  {
404  OGLPLUS_GLFUNC(MultiTexCoord2d)(tex_unit, s, t);
405  }
406 
407  static void MultiTexCoord_(
408  GLenum tex_unit,
409  GLdouble s,
410  GLdouble t,
411  GLdouble r
412  )
413  {
414  OGLPLUS_GLFUNC(MultiTexCoord3d)(tex_unit, s, t, r);
415  }
416 
417  static void MultiTexCoord_(
418  GLenum tex_unit,
419  GLdouble s,
420  GLdouble t,
421  GLdouble r,
422  GLdouble q
423  )
424  {
425  OGLPLUS_GLFUNC(MultiTexCoord4d)(tex_unit, s, t, r, q);
426  }
427 public:
429 
433  template <typename Type>
434  static void MultiTexCoord(
435  TextureUnitSelector tex_unit,
436  Type s
437  )
438  {
439  MultiTexCoord_(
440  GLenum(GL_TEXTURE0 + GLuint(tex_unit)),
441  s
442  );
443  }
444 
446 
450  template <typename Type>
451  static void MultiTexCoord(
452  TextureUnitSelector tex_unit,
453  Type s,
454  Type t
455  )
456  {
457  MultiTexCoord_(
458  GLenum(GL_TEXTURE0 + GLuint(tex_unit)),
459  s, t
460  );
461  }
462 
464 
468  template <typename Type>
469  static void MultiTexCoord(TextureUnitSelector tex_unit,
470  Type s,
471  Type t,
472  Type r
473  )
474  {
475  MultiTexCoord_(
476  GLenum(GL_TEXTURE0 + GLuint(tex_unit)),
477  s, t, r
478  );
479  }
480 
482 
486  template <typename Type>
487  static void MultiTexCoord(
488  TextureUnitSelector tex_unit,
489  Type s,
490  Type t,
491  Type r,
492  Type q
493  )
494  {
495  MultiTexCoord_(
496  GLenum(GL_TEXTURE0 + GLuint(tex_unit)),
497  s, t, r, q
498  );
499  }
500 
501 private:
502  static void Normal_(GLint x, GLint y, GLint z)
503  {
504  OGLPLUS_GLFUNC(Normal3i)(x, y, z);
505  }
506 
507  static void Normal_(GLfloat x, GLfloat y, GLfloat z)
508  {
509  OGLPLUS_GLFUNC(Normal3f)(x, y, z);
510  }
511 
512  static void Normal_(GLdouble x, GLdouble y, GLdouble z)
513  {
514  OGLPLUS_GLFUNC(Normal3d)(x, y, z);
515  }
516 public:
518 
522  template <typename Type>
523  static void Normal(Type x, Type y, Type z)
524  {
525  Normal_(x, y, z);
526  }
527 
528 private:
529  static void FogCoord_(GLfloat c)
530  {
531  OGLPLUS_GLFUNC(FogCoordf)(c);
532  }
533 
534  static void FogCoord_(GLdouble c)
535  {
536  OGLPLUS_GLFUNC(FogCoordd)(c);
537  }
538 public:
540 
544  template <typename Type>
545  static void FogCoord(Type c)
546  {
547  FogCoord_(c);
548  }
549 
550 private:
551  static void Color_(GLubyte r, GLubyte g, GLubyte b)
552  {
553  OGLPLUS_GLFUNC(Color3ub)(r, g, b);
554  }
555 
556  static void Color_(GLubyte r, GLubyte g, GLubyte b, GLubyte a)
557  {
558  OGLPLUS_GLFUNC(Color4ub)(r, g, b, a);
559  }
560 
561  static void Color_(GLint r, GLint g, GLint b)
562  {
563  OGLPLUS_GLFUNC(Color3i)(r, g, b);
564  }
565 
566  static void Color_(GLint r, GLint g, GLint b, GLint a)
567  {
568  OGLPLUS_GLFUNC(Color4i)(r, g, b, a);
569  }
570 
571  static void Color_(GLfloat r, GLfloat g, GLfloat b)
572  {
573  OGLPLUS_GLFUNC(Color3f)(r, g, b);
574  }
575 
576  static void Color_(GLfloat r, GLfloat g, GLfloat b, GLfloat a)
577  {
578  OGLPLUS_GLFUNC(Color4f)(r, g, b, a);
579  }
580 
581  static void Color_(GLdouble r, GLdouble g, GLdouble b)
582  {
583  OGLPLUS_GLFUNC(Color3d)(r, g, b);
584  }
585 
586  static void Color_(GLdouble r, GLdouble g, GLdouble b, GLdouble a)
587  {
588  OGLPLUS_GLFUNC(Color4d)(r, g, b, a);
589  }
590 public:
592 
596  template <typename Type>
597  static void Color(Type r, Type g, Type b)
598  {
599  Color_(r, g, b);
600  }
601 
603 
607  template <typename Type>
608  static void Color(Type r, Type g, Type b, Type a)
609  {
610  Color_(r, g, b, a);
611  }
612 
613 private:
614  static void SColor_(GLubyte r, GLubyte g, GLubyte b)
615  {
616  OGLPLUS_GLFUNC(SecondaryColor3ub)(r, g, b);
617  }
618 
619  static void SColor_(GLint r, GLint g, GLint b)
620  {
621  OGLPLUS_GLFUNC(SecondaryColor3i)(r, g, b);
622  }
623 
624  static void SColor_(GLfloat r, GLfloat g, GLfloat b)
625  {
626  OGLPLUS_GLFUNC(SecondaryColor3f)(r, g, b);
627  }
628 
629  static void SColor_(GLdouble r, GLdouble g, GLdouble b)
630  {
631  OGLPLUS_GLFUNC(SecondaryColor3d)(r, g, b);
632  }
633 public:
635 
639  template <typename Type>
640  static void SecondaryColor(Type r, Type g, Type b)
641  {
642  SColor_(r, g, b);
643  }
644 
645 private:
646  static void Index_(GLint i)
647  {
648  OGLPLUS_GLFUNC(Indexi)(i);
649  }
650 
651  static void Index_(GLfloat i)
652  {
653  OGLPLUS_GLFUNC(Indexf)(i);
654  }
655 
656  static void Index_(GLdouble i)
657  {
658  OGLPLUS_GLFUNC(Indexd)(i);
659  }
660 public:
662 
666  template <typename Type>
667  static void Index(Type i)
668  {
669  Index_(i);
670  }
671 };
672 #endif
673 
674 } // namespace oglplus
675 
676 #endif // include guard
static void MultiTexCoord(TextureUnitSelector tex_unit, Type s, Type t)
Specifies vertex position s,t coordinates.
Definition: ARB_compatibility.hpp:451
static void MultiTexCoord(TextureUnitSelector tex_unit, Type s)
Specifies vertex position s coordinate.
Definition: ARB_compatibility.hpp:434
static void Normal(Type x, Type y, Type z)
Specifies vertex x,y,z normal components.
Definition: ARB_compatibility.hpp:523
static void TexCoord(Type s)
Specifies vertex position s coordinate.
Definition: ARB_compatibility.hpp:296
static void Begin(CompatibilityPrimitiveType mode)
Begins geometric object specification.
Definition: ARB_compatibility.hpp:44
Funcions and classes for handling and wrapping OpenGL extensions.
static void MultiTexCoord(TextureUnitSelector tex_unit, Type s, Type t, Type r, Type q)
Specifies vertex position s,t,r,q coordinates.
Definition: ARB_compatibility.hpp:487
static void LoadMatrix(const Mat4d &matrix)
Loads the specified matrix.
Definition: ARB_compatibility.hpp:144
static void MultiTexCoord(TextureUnitSelector tex_unit, Type s, Type t, Type r)
Specifies vertex position s,t,r coordinates.
Definition: ARB_compatibility.hpp:469
static void TexCoord(Type s, Type t)
Specifies vertex position s,t coordinates.
Definition: ARB_compatibility.hpp:307
static void Color(Type r, Type g, Type b, Type a)
Specifies vertex r,g,b,a color components.
Definition: ARB_compatibility.hpp:608
static void Color(Type r, Type g, Type b)
Specifies vertex r,g,b color components.
Definition: ARB_compatibility.hpp:597
static void Index(Type i)
Specifies vertex coordinates.
Definition: ARB_compatibility.hpp:667
This template serves as a wrapper for OpenGL bitfields.
Definition: bitfield.hpp:56
CompatibilityPrimitiveType
Compatibility primitive type enumeration.
Definition: primitive_type.hpp:28
static void TexCoord(Type s, Type t, Type r, Type q)
Specifies vertex position s,t,r,q coordinates.
Definition: ARB_compatibility.hpp:329
static void Vertex(Type x, Type y, Type z)
Specifies vertex position x,y,z coordinates.
Definition: ARB_compatibility.hpp:213
static void PushAttrib(Bitfield< CompatibilityAttributeGroup > attr_groups)
Pushes specified server attribute group variables on the stack.
Definition: ARB_compatibility.hpp:65
static void PushClientAttrib(Bitfield< CompatibilityClientAttributeGroup > attrib_groups)
Pushes specified client attribute group variables on the stack.
Definition: ARB_compatibility.hpp:76
static void PopClientAttrib(void)
Pop previously pushed client attribute group variables from the stack.
Definition: ARB_compatibility.hpp:100
static void SecondaryColor(Type r, Type g, Type b)
Specifies vertex r,g,b secondary color components.
Definition: ARB_compatibility.hpp:640
static void LoadMatrix(const Mat4f &matrix)
Loads the specified matrix.
Definition: ARB_compatibility.hpp:133
static void Vertex(Type x, Type y, Type z, Type w)
Specifies vertex position x,y,z,w coordinates.
Definition: ARB_compatibility.hpp:224
CompatibilityMatrixMode
Compatibility matrix mode enumeration.
Definition: matrix_mode.hpp:28
static void End(void)
Ends geometric object specification.
Definition: ARB_compatibility.hpp:54
Wrapper for the ARB_compatibility extension.
Definition: ARB_compatibility.hpp:34
static void Vertex(Type x, Type y)
Specifies vertex position x,y coordinates.
Definition: ARB_compatibility.hpp:202
static void LoadIdentity(void)
Loads a identity matrix.
Definition: ARB_compatibility.hpp:122
The CompatibilityMatrixMode enumeration.
static void MatrixMode(CompatibilityMatrixMode mode)
Sets the matrix mode for the subsequent commands.
Definition: ARB_compatibility.hpp:111
static void FogCoord(Type c)
Specifies vertex coordinates.
Definition: ARB_compatibility.hpp:545
static void PopAttrib(void)
Pop previously pushed server attribute group variables from the stack.
Definition: ARB_compatibility.hpp:89
Type for the texture unit selector (implementation-dependent limited) number.
Definition: texture_unit.hpp:22
Texture and image unit selectors.
The CompatibilityPrimitiveType enumeration.
The CompatibilityAttributeGroup enumerations.
static void TexCoord(Type s, Type t, Type r)
Specifies vertex position s,t,r coordinates.
Definition: ARB_compatibility.hpp:318
A matrix class.

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).