Open Inventor Reference
SbOpenGL.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2011 MeVis Medical Solutions AG All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Further, this software is distributed without any warranty that it is
16  * free of the rightful claim of any third person regarding infringement
17  * or the like. Any license provided herein, whether implied or
18  * otherwise, applies only to this software file. Patent licenses, if
19  * any, provided herein do not apply to combinations of this program with
20  * other software, or any other product whatsoever.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Contact information: MeVis, Center for Medical Diagnostic Systems and
27  * Visualization GmbH, Universitätsallee 29, D-28359 Bremen, GERMANY, or:
28  *
29  * http://www.mevis.de
30  *
31  */
32 
33 /*
34  Author: Florian Link
35  Date: 09-2011
36 */
37 
38 #ifndef _SB_OPENGL_
39 #define _SB_OPENGL_
40 
42 
45 #include <GL/glew.h>
46 
47 #include <vector>
48 
50 {
51 public:
52  static void init();
53 };
54 
57 {
58 public:
59  static void glColor4ubv (const GLubyte *v);
60 
61  static void glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
62  static void glMaterialf (GLenum face, GLenum pname, GLfloat param);
63 
64  static void glLoadIdentity (void);
65  static void glLoadMatrixf (const GLfloat *m);
66  static void glMultMatrixf (const GLfloat *m);
67  static void glMatrixMode (GLenum mode);
68  static void glScalef (GLfloat x, GLfloat y, GLfloat z);
69  static void glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
70  static void glTranslatef (GLfloat x, GLfloat y, GLfloat z);
71  static void glPushMatrix (void);
72  static void glPopMatrix (void);
73 
74  static void glLightf (GLenum light, GLenum pname, GLfloat param);
75  static void glLightfv (GLenum light, GLenum pname, const GLfloat *params);
76 
77  static void glClipPlane (GLenum plane, const GLdouble *equation);
78 
79  static unsigned int projectionMatrixId();
80  static unsigned int modelViewMatrixId();
81  static unsigned int textureMatrixId();
82  static unsigned int materialId();
83  static unsigned int lightId();
84  static unsigned int clipPlaneId();
85 
86 private:
87  static unsigned int _uniqueId;
88 
89  static GLenum _matrixMode;
90 
91  static std::vector<unsigned int> _matrixIdStack[3];
92  static unsigned int _matrixId[3];
93 
94  static unsigned int _materialId;
95  static unsigned int _lightId;
96  static unsigned int _clipPlaneId;
97 
98 };
99 
100 #endif
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
a class that offers static wrappers around OpenGL functions
Definition: SbOpenGL.h:57
static void glLoadMatrixf(const GLfloat *m)
static void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
static void glClipPlane(GLenum plane, const GLdouble *equation)
static unsigned int modelViewMatrixId()
static void glLightf(GLenum light, GLenum pname, GLfloat param)
static void glColor4ubv(const GLubyte *v)
static void glPushMatrix(void)
static unsigned int clipPlaneId()
static void glMultMatrixf(const GLfloat *m)
static unsigned int projectionMatrixId()
static void glScalef(GLfloat x, GLfloat y, GLfloat z)
static void glLoadIdentity(void)
static void glMatrixMode(GLenum mode)
static unsigned int materialId()
static unsigned int textureMatrixId()
static void glTranslatef(GLfloat x, GLfloat y, GLfloat z)
static void glLightfv(GLenum light, GLenum pname, const GLfloat *params)
static void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
static void glMaterialf(GLenum face, GLenum pname, GLfloat param)
static void glPopMatrix(void)
static unsigned int lightId()
include the glew header, which allows to access the whole OpenGL and extensions API without using nat...
Definition: SbOpenGL.h:50
static void init()