home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Tools / Mesa-1.2.1 / src-glu / nurbs.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-05  |  3.9 KB  |  204 lines

  1. /* nurbs.c */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  1.2
  6.  * Copyright (C) 1995  Brian Paul  (brianp@ssec.wisc.edu)
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25. $Id: nurbs.c,v 1.9 1995/05/30 13:12:39 brianp Exp $
  26.  
  27. $Log: nurbs.c,v $
  28.  * Revision 1.9  1995/05/30  13:12:39  brianp
  29.  * added gluNurbsCallback() stub
  30.  *
  31.  * Revision 1.8  1995/05/29  20:09:11  brianp
  32.  * added gluGetNurbsProperty()
  33.  *
  34.  * Revision 1.7  1995/05/24  13:44:11  brianp
  35.  * added gluBeginTrim, gluEndTrim, gluPwlCurve stubs
  36.  *
  37.  * Revision 1.6  1995/05/22  16:56:20  brianp
  38.  * Release 1.2
  39.  *
  40.  * Revision 1.5  1995/05/16  19:17:21  brianp
  41.  * minor changes to allow compilation with real OpenGL headers
  42.  *
  43.  * Revision 1.4  1995/04/28  20:06:23  brianp
  44.  * print an error message when trying to use gluNewNurbsRenderer()
  45.  *
  46.  * Revision 1.3  1995/04/28  14:37:32  brianp
  47.  * moved GLUnurbsObj struct from .h to .c file
  48.  *
  49.  * Revision 1.2  1995/03/04  19:39:18  brianp
  50.  * version 1.1 beta
  51.  *
  52.  * Revision 1.1  1995/02/24  15:45:01  brianp
  53.  * Initial revision
  54.  *
  55.  */
  56.  
  57.  
  58. #include <math.h>
  59. #include <stdio.h>
  60. #include <stdlib.h>
  61. #include "gluP.h"
  62.  
  63.  
  64.  
  65. struct GLUnurbsObj {
  66.     GLboolean Culling;
  67. };
  68.  
  69.  
  70.  
  71.  
  72. GLUnurbsObj *gluNewNurbsRenderer( void )
  73. {
  74.    GLUnurbsObj *n;
  75.  
  76.    fprintf(stderr,"Error: NURBS not implemented in Mesa\n");
  77.  
  78.    n = (GLUnurbsObj *) malloc( sizeof(struct GLUnurbsObj) );
  79.    if (n) {
  80.       /* init */
  81.    }
  82.    return n;
  83. }
  84.  
  85.  
  86.  
  87. void gluDeleteNurbsRenderer( GLUnurbsObj *nobj )
  88. {
  89.    if (nobj) {
  90.       free( nobj );
  91.    }
  92. }
  93.  
  94.  
  95.  
  96. void gluLoadSamplingMatrices( GLUnurbsObj *nobj,
  97.                   const GLfloat modelMatrix[16],
  98.                   const GLfloat projMatrix[16],
  99.                   const GLint viewport[4] )
  100. {
  101. }
  102.  
  103.  
  104. void gluNurbsProperty( GLUnurbsObj *nobj, GLUenum property, GLfloat value )
  105. {
  106.    switch (property) {
  107.       case GLU_SAMPLING_TOLERANCE:
  108.          break;
  109.       case GLU_DISPLAY_MODE:
  110.          break;
  111.       case GLU_CULLING:
  112.      nobj->Culling = (GLboolean) value;
  113.          break;
  114.       case GLU_AUTO_LOAD_MATRIX:
  115.          break;
  116.    }
  117. }
  118.  
  119.  
  120. void gluGetNurbsProperty( GLUnurbsObj *nobj, GLenum property, GLfloat *value )
  121. {
  122.    /* TODO: this function is incomplete */
  123.    switch (property) {
  124.       case GLU_SAMPLING_TOLERANCE:
  125.          *value = 0.0;
  126.          break;
  127.       case GLU_DISPLAY_MODE:
  128.          *value = 0.0;
  129.          break;
  130.       case GLU_CULLING:
  131.      *value = nobj->Culling ? 1.0 : 0.0;
  132.          break;
  133.       case GLU_AUTO_LOAD_MATRIX:
  134.          *value = 0.0;
  135.      break;
  136.       default:
  137.      /* TODO??? */
  138.      ;
  139.    }
  140. }
  141.  
  142.  
  143.  
  144. void gluBeginCurve( GLUnurbsObj *nobj )
  145. {
  146. }
  147.  
  148.  
  149. void gluEndCurve( GLUnurbsObj * nobj )
  150. {
  151. }
  152.  
  153.  
  154. void gluNurbsCurve( GLUnurbsObj *nobj, GLint nknots, GLfloat *knot,
  155.             GLint stride, GLfloat *ctlarray, GLint order, GLenum type )
  156. {
  157. }
  158.  
  159.  
  160. void gluBeginSurface( GLUnurbsObj *nobj )
  161. {
  162. }
  163.  
  164.  
  165. void gluEndSurface( GLUnurbsObj * nobj )
  166. {
  167. }
  168.  
  169.  
  170. void gluNurbsSurface( GLUnurbsObj *nobj,
  171.               GLint sknot_count, GLfloat *sknot,
  172.               GLint tknot_count, GLfloat *tknot,
  173.               GLint s_stride, GLint t_stride,
  174.               GLfloat *ctlarray,
  175.               GLint sorder, GLint torder,
  176.                       GLenum type )
  177. {
  178. }
  179.  
  180.  
  181.  
  182. void gluBeginTrim( GLUnurbsObj *nobj )
  183. {
  184. }
  185.  
  186.  
  187.  
  188. void gluEndTrim( GLUnurbsObj *nobj )
  189. {
  190. }
  191.  
  192.  
  193.  
  194. void gluPwlCurve( GLUnurbsObj *nobj, GLint count, GLfloat *array,
  195.           GLint stride, GLenum type )
  196. {
  197. }
  198.  
  199.  
  200. void gluNurbsCallback( GLUnurbsObj *nobj, GLenum which, void (*fn)() )
  201. {
  202. }
  203.  
  204.