Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

  1. #ifndef __gluglrenderer_h_
  2. #define __gluglrenderer_h_
  3. /**************************************************************************
  4. * *
  5. * Copyright (C) 1991, Silicon Graphics, Inc. *
  6. * *
  7. * These coded instructions, statements, and computer programs contain *
  8. * unpublished proprietary information of Silicon Graphics, Inc., and *
  9. * are protected by Federal copyright law. They may not be disclosed *
  10. * to third parties or copied or duplicated in any form, in whole or *
  11. * in part, without the prior written consent of Silicon Graphics, Inc. *
  12. * *
  13. **************************************************************************/
  14. /*
  15. * glrenderer.h - $Revision: 1.4 $
  16. */
  17. #ifndef NT
  18. #pragma once
  19. #endif
  20. #include <GL/gl.h>
  21. #include <GL/glu.h>
  22. #include "nurbstes.h"
  23. #include "glsurfev.h"
  24. #include "glcurvev.h"
  25. class GLUnurbs : public NurbsTessellator {
  26. public:
  27. GLUnurbs( void );
  28. void loadGLMatrices( void );
  29. #ifdef NT
  30. void useGLMatrices( const GLfloat modelMatrix[4][4],
  31. const GLfloat projMatrix[4][4],
  32. const GLint viewport[4] );
  33. #else
  34. void useGLMatrices( const GLfloat modelMatrix[16],
  35. const GLfloat projMatrix[16],
  36. const GLint viewport[4] );
  37. #endif
  38. void errorHandler( int );
  39. void bgnrender( void );
  40. void endrender( void );
  41. void setautoloadmode( INREAL value )
  42. { if (value) autoloadmode = GL_TRUE;
  43. else autoloadmode = GL_FALSE; }
  44. GLboolean getautoloadmode( void ) { return autoloadmode; }
  45. #ifdef NT
  46. GLUnurbsErrorProc errorCallback;
  47. #else
  48. void (*errorCallback)( GLenum );
  49. #endif
  50. void postError( GLenum which )
  51. { if (errorCallback) (*errorCallback)( which ); }
  52. private:
  53. GLboolean autoloadmode;
  54. OpenGLSurfaceEvaluator surfaceEvaluator;
  55. OpenGLCurveEvaluator curveEvaluator;
  56. void loadSamplingMatrix( const GLfloat vmat[4][4],
  57. const GLint viewport[4] );
  58. void loadCullingMatrix( GLfloat vmat[4][4] );
  59. static void grabGLMatrix( GLfloat vmat[4][4] );
  60. static void transform4d( GLfloat A[4], GLfloat B[4],
  61. GLfloat mat[4][4] );
  62. static void multmatrix4d( GLfloat n[4][4], GLfloat left[4][4],
  63. GLfloat right[4][4] );
  64. };
  65. #endif /* __gluglrenderer_h_ */