ReactOS  0.4.13-dev-73-gcfe54aa
glrenderer.h
Go to the documentation of this file.
1 /*
2  * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
3  * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice including the dates of first publication and
13  * either this permission notice or a reference to
14  * http://oss.sgi.com/projects/FreeB/
15  * shall be included in all copies or substantial portions of the Software.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23  * SOFTWARE.
24  *
25  * Except as contained in this notice, the name of Silicon Graphics, Inc.
26  * shall not be used in advertising or otherwise to promote the sale, use or
27  * other dealings in this Software without prior written authorization from
28  * Silicon Graphics, Inc.
29  */
30 
31 /*
32  * glrenderer.h
33  *
34  */
35 
36 #ifndef __gluglrenderer_h_
37 #define __gluglrenderer_h_
38 
39 #include <GL/gl.h>
40 #include <GL/glu.h>
41 #include "nurbstess.h"
42 #include "glsurfeval.h"
43 #include "glcurveval.h"
44 
45 extern "C" {
47 }
48 
49 class GLUnurbs : public NurbsTessellator {
50 
51 public:
52  GLUnurbs( void );
53  void loadGLMatrices( void );
54  void useGLMatrices( const GLfloat modelMatrix[16],
55  const GLfloat projMatrix[16],
56  const GLint viewport[4] );
57  void setSamplingMatrixIdentity( void );
58 
59  void errorHandler( int );
60  void bgnrender( void );
61  void endrender( void );
63  {
64 
65  if (value) autoloadmode = GL_TRUE;
66  else autoloadmode = GL_FALSE;
67 
68  }
70 
72  void postError( int which )
73  { if (errorCallback) (errorCallback)( (GLenum)which ); }
74 #ifdef _WIN32
75  void putSurfCallBack(GLenum which, void (GLAPIENTRY *fn)() )
76 #else
78 #endif
79  {
82  }
83 
85  {
87  }
88 
90  {
92  }
93 
95  {
97  }
98 
100  {
102  }
103 
104  void setNurbsCallbackData(void* userData)
105  {
108  }
109 
110 
111  //for LOD
113  {
115  }
116 
117  //NEWCALLBACK
119  {
120  return callbackFlag;
121  }
123  {
124  callbackFlag = flag;
127  }
128 
129 private:
133 
134  void loadSamplingMatrix( const GLfloat vmat[4][4],
135  const GLint viewport[4] );
136  void loadCullingMatrix( GLfloat vmat[4][4] );
137  static void grabGLMatrix( GLfloat vmat[4][4] );
138  static void transform4d( GLfloat A[4], GLfloat B[4],
139  GLfloat mat[4][4] );
140  static void multmatrix4d( GLfloat n[4][4], const GLfloat left[4][4],
141  const GLfloat right[4][4] );
142 
144 };
145 
146 #endif /* __gluglrenderer_h_ */
int get_callback_auto_normal()
Definition: glrenderer.h:94
GLint level
Definition: gl.h:1546
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
Definition: typeof.h:49
void bgnrender(void)
Definition: glrenderer.cc:107
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
static void grabGLMatrix(GLfloat vmat[4][4])
Definition: glrenderer.cc:159
static GLenum which
Definition: wgl_font.c:159
#define GL_FALSE
Definition: gl.h:173
GLdouble n
Definition: glext.h:7729
void put_vertices_call_back(int flag)
Definition: glcurveval.h:87
static const MAT2 mat
Definition: font.c:66
void putCallBack(GLenum which, _GLUfuncptr fn)
Definition: glcurveval.cc:305
void setSamplingMatrixIdentity(void)
Definition: glrenderer.cc:171
void put_vertices_call_back(int flag)
Definition: glsurfeval.h:153
errorCallbackType errorCallback
Definition: glrenderer.h:71
unsigned char GLboolean
Definition: gl.h:151
void setNurbsCallbackData(void *userData)
Definition: glrenderer.h:104
void put_callback_auto_normal(int flag)
Definition: glsurfeval.h:158
void put_callback_auto_normal(int flag)
Definition: glrenderer.h:99
void endrender(void)
Definition: glrenderer.cc:115
static void transform4d(GLfloat A[4], GLfloat B[4], GLfloat mat[4][4])
Definition: glrenderer.cc:280
void LOD_eval_list(int level)
Definition: glsurfeval.cc:84
void postError(int which)
Definition: glrenderer.h:72
int is_callback()
Definition: glrenderer.h:118
int callbackFlag
Definition: glrenderer.h:143
void put_vertices_call_back(int flag)
Definition: glrenderer.h:89
GLint left
Definition: glext.h:7726
GLdouble GLdouble right
Definition: glext.h:10859
void loadSamplingMatrix(const GLfloat vmat[4][4], const GLint viewport[4])
Definition: glrenderer.cc:194
void(WINAPI * _GLUfuncptr)(void)
Definition: wgl_font.c:148
#define INREAL
Definition: types.h:40
Definition: ttei1.cpp:12
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
int get_vertices_call_back()
Definition: glrenderer.h:84
void putCallBack(GLenum which, _GLUfuncptr fn)
Definition: glsurfeval.cc:1190
OpenGLCurveEvaluator curveEvaluator
Definition: glrenderer.h:132
void setautoloadmode(INREAL value)
Definition: glrenderer.h:62
unsigned int GLenum
Definition: gl.h:150
void put_callbackFlag(int flag)
Definition: glrenderer.h:122
void putSurfCallBack(GLenum which, _GLUfuncptr fn)
Definition: glrenderer.h:77
static void multmatrix4d(GLfloat n[4][4], const GLfloat left[4][4], const GLfloat right[4][4])
Definition: glrenderer.cc:294
GLboolean getautoloadmode(void)
Definition: glrenderer.h:69
#define GL_TRUE
Definition: gl.h:174
#define B(row, col)
void set_callback_userData(void *data)
Definition: glcurveval.h:96
void useGLMatrices(const GLfloat modelMatrix[16], const GLfloat projMatrix[16], const GLint viewport[4])
Definition: glrenderer.cc:141
void loadCullingMatrix(GLfloat vmat[4][4])
Definition: glrenderer.cc:237
GLboolean autoloadmode
Definition: glrenderer.h:130
float GLfloat
Definition: gl.h:161
int GLint
Definition: gl.h:156
GLUnurbs(void)
Definition: glrenderer.cc:42
void LOD_eval_list(int level)
Definition: glrenderer.h:112
void loadGLMatrices(void)
Definition: glrenderer.cc:129
#define GLAPIENTRY
Definition: glu.h:44
#define APIENTRY
Definition: api.h:79
void errorHandler(int)
Definition: glrenderer.cc:120
void(APIENTRY * errorCallbackType)(GLenum)
Definition: glrenderer.h:46
void set_callback_userData(void *data)
Definition: glsurfeval.h:168
OpenGLSurfaceEvaluator surfaceEvaluator
Definition: glrenderer.h:131