ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

glrenderer.h
Go to the documentation of this file.
00001 /*
00002 ** License Applicability. Except to the extent portions of this file are
00003 ** made subject to an alternative license as permitted in the SGI Free
00004 ** Software License B, Version 1.1 (the "License"), the contents of this
00005 ** file are subject only to the provisions of the License. You may not use
00006 ** this file except in compliance with the License. You may obtain a copy
00007 ** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
00008 ** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
00009 **
00010 ** http://oss.sgi.com/projects/FreeB
00011 **
00012 ** Note that, as provided in the License, the Software is distributed on an
00013 ** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
00014 ** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
00015 ** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
00016 ** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
00017 **
00018 ** Original Code. The Original Code is: OpenGL Sample Implementation,
00019 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
00020 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
00021 ** Copyright in any portions created by third parties is as indicated
00022 ** elsewhere herein. All Rights Reserved.
00023 **
00024 ** Additional Notice Provisions: The application programming interfaces
00025 ** established by SGI in conjunction with the Original Code are The
00026 ** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
00027 ** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
00028 ** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
00029 ** Window System(R) (Version 1.3), released October 19, 1998. This software
00030 ** was created using the OpenGL(R) version 1.2.1 Sample Implementation
00031 ** published by SGI, but has not been independently verified as being
00032 ** compliant with the OpenGL(R) version 1.2.1 Specification.
00033 */
00034 
00035 /*
00036  * glrenderer.h
00037  *
00038  * $Date: 2007-10-19 23:21:45 +0000 (Fri, 19 Oct 2007) $ $Revision: 1.1 $
00039  * $Header: /cygdrive/c/RCVS/CVS/ReactOS/reactos/lib/glu32/libnurbs/interface/glrenderer.h,v 1.1 2004/02/02 16:39:08 navaraf Exp $
00040  */
00041 
00042 #ifndef __gluglrenderer_h_
00043 #define __gluglrenderer_h_
00044 
00045 #include <GL/gl.h>
00046 #include <GL/glu.h>
00047 #include "nurbstess.h"
00048 #include "glsurfeval.h"
00049 #include "glcurveval.h"
00050 
00051 class GLUnurbs : public NurbsTessellator {
00052 
00053 public:
00054         GLUnurbs( void );
00055     void    loadGLMatrices( void );
00056     void    useGLMatrices( const GLfloat modelMatrix[16],
00057                    const GLfloat projMatrix[16],
00058                    const GLint viewport[4] );
00059     void        setSamplingMatrixIdentity( void );
00060 
00061     void    errorHandler( int );
00062     void    bgnrender( void );
00063     void    endrender( void );
00064     void    setautoloadmode( INREAL value )
00065                 {
00066 
00067               if (value) autoloadmode = GL_TRUE;
00068               else autoloadmode = GL_FALSE;
00069 
00070             }
00071     GLboolean   getautoloadmode( void ) { return autoloadmode; }
00072 
00073     void    (APIENTRY *errorCallback)( GLenum );
00074     void    postError( int which )
00075             { if (errorCallback) (errorCallback)( (GLenum)which ); }
00076 #ifdef _WIN32
00077     void        putSurfCallBack(GLenum which, void (GLAPIENTRY *fn)() )
00078 #else
00079     void        putSurfCallBack(GLenum which, _GLUfuncptr fn )
00080 #endif
00081       {
00082     curveEvaluator.putCallBack(which, fn);
00083     surfaceEvaluator.putCallBack(which, fn);
00084       }
00085 
00086     int         get_vertices_call_back()
00087       {
00088     return surfaceEvaluator.get_vertices_call_back();
00089       }
00090 
00091     void        put_vertices_call_back(int flag)
00092       {
00093     surfaceEvaluator.put_vertices_call_back(flag);
00094       }
00095 
00096     int         get_callback_auto_normal()
00097       {
00098         return surfaceEvaluator.get_callback_auto_normal();
00099       }
00100 
00101     void         put_callback_auto_normal(int flag)
00102       {
00103         surfaceEvaluator.put_callback_auto_normal(flag);
00104       }
00105 
00106     void       setNurbsCallbackData(void* userData)
00107       {
00108        curveEvaluator.set_callback_userData(userData);
00109        surfaceEvaluator.set_callback_userData(userData);
00110      }
00111 
00112 
00113     //for LOD
00114     void LOD_eval_list(int level)
00115       {
00116     surfaceEvaluator.LOD_eval_list(level);
00117       }
00118 
00119     //NEWCALLBACK
00120     int        is_callback()
00121       {
00122     return callbackFlag;
00123       }
00124     void       put_callbackFlag(int flag)
00125       {
00126     callbackFlag = flag;
00127     surfaceEvaluator.put_vertices_call_back(flag);
00128     curveEvaluator.put_vertices_call_back(flag);
00129       }
00130 
00131 private:
00132     GLboolean           autoloadmode;
00133     OpenGLSurfaceEvaluator  surfaceEvaluator;
00134     OpenGLCurveEvaluator    curveEvaluator;
00135 
00136     void        loadSamplingMatrix( const GLfloat vmat[4][4],
00137                     const GLint viewport[4] );
00138     void        loadCullingMatrix( GLfloat vmat[4][4] );
00139     static void     grabGLMatrix( GLfloat vmat[4][4] );
00140     static void     transform4d( GLfloat A[4], GLfloat B[4],
00141                 GLfloat mat[4][4] );
00142     static void     multmatrix4d( GLfloat n[4][4], const GLfloat left[4][4],
00143                 const GLfloat right[4][4] );
00144 
00145    int                  callbackFlag;
00146 };
00147 
00148 #endif /* __gluglrenderer_h_ */

Generated on Fri May 25 2012 04:21:45 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.