patch to import Jon Smirl's work from Bitkeeper
[mesa.git] / src / glu / mini / nurbs.c
1 /* $Id: nurbs.c,v 1.2 2003/08/22 20:11:43 brianp Exp $ */
2
3 /*
4 * Mesa 3-D graphics library
5 * Version: 3.3
6 * Copyright (C) 1995-2000 Brian Paul
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 * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it)
26 * See README2 for more info.
27 */
28
29
30 #ifdef PC_HEADER
31 #include "all.h"
32 #else
33 #include <stdio.h>
34 #include <stdlib.h>
35 #include "gluP.h"
36 #include "nurbs.h"
37 #endif
38
39
40 void
41 call_user_error(GLUnurbsObj * nobj, GLenum error)
42 {
43 nobj->error = error;
44 if (nobj->error_callback != NULL) {
45 (*(nobj->error_callback)) (error);
46 }
47 else {
48 printf("NURBS error %d %s\n", error, (char *) gluErrorString(error));
49 }
50 }
51
52
53
54 GLUnurbsObj *GLAPIENTRY
55 gluNewNurbsRenderer(void)
56 {
57 GLUnurbsObj *n;
58 GLfloat tmp_viewport[4];
59 GLint i, j;
60
61 n = (GLUnurbsObj *) malloc(sizeof(GLUnurbsObj));
62 return n;
63 }
64
65
66
67 void GLAPIENTRY
68 gluDeleteNurbsRenderer(GLUnurbsObj * nobj)
69 {
70 if (nobj) {
71 free(nobj);
72 }
73 }
74
75
76
77 void GLAPIENTRY
78 gluLoadSamplingMatrices(GLUnurbsObj * nobj,
79 const GLfloat modelMatrix[16],
80 const GLfloat projMatrix[16], const GLint viewport[4])
81 {
82 }
83
84
85 void GLAPIENTRY
86 gluNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat value)
87 {
88 }
89
90
91 void GLAPIENTRY
92 gluGetNurbsProperty(GLUnurbsObj * nobj, GLenum property, GLfloat * value)
93 {
94 }
95
96
97
98 void GLAPIENTRY
99 gluBeginCurve(GLUnurbsObj * nobj)
100 {
101 }
102
103
104 void GLAPIENTRY
105 gluEndCurve(GLUnurbsObj * nobj)
106 {
107 }
108
109
110 void GLAPIENTRY
111 gluNurbsCurve(GLUnurbsObj * nobj, GLint nknots, GLfloat * knot,
112 GLint stride, GLfloat * ctlarray, GLint order, GLenum type)
113 {
114 }
115
116
117 void GLAPIENTRY
118 gluBeginSurface(GLUnurbsObj * nobj)
119 {
120 }
121
122
123 void GLAPIENTRY
124 gluEndSurface(GLUnurbsObj * nobj)
125 {
126 }
127
128
129 void GLAPIENTRY
130 gluNurbsSurface(GLUnurbsObj * nobj,
131 GLint sknot_count, GLfloat * sknot,
132 GLint tknot_count, GLfloat * tknot,
133 GLint s_stride, GLint t_stride,
134 GLfloat * ctrlarray, GLint sorder, GLint torder, GLenum type)
135 {
136 }
137
138
139 void GLAPIENTRY
140 gluNurbsCallback(GLUnurbsObj * nobj, GLenum which, void (GLCALLBACK * fn) ())
141 {
142 }
143
144 void GLAPIENTRY
145 gluBeginTrim(GLUnurbsObj * nobj)
146 {
147 }
148
149 void GLAPIENTRY
150 gluPwlCurve(GLUnurbsObj * nobj, GLint count, GLfloat * array, GLint stride,
151 GLenum type)
152 {
153 }
154
155 void GLAPIENTRY
156 gluEndTrim(GLUnurbsObj * nobj)
157 {
158 }