9f39cacb41dcc391d6b2dc9f9b70c4952610f0b6
3 * Mesa 3-D graphics library
5 * Copyright (C) 1995-2000 Brian Paul
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the Free
19 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 * NURBS implementation written by Bogdan Sikorski (bogdan@cira.it)
25 * See README2 for more info.
40 call_user_error(GLUnurbsObj
* nobj
, GLenum error
)
43 if (nobj
->error_callback
!= NULL
) {
44 (*(nobj
->error_callback
)) (error
);
47 printf("NURBS error %d %s\n", error
, (char *) gluErrorString(error
));
53 GLUnurbsObj
*GLAPIENTRY
54 gluNewNurbsRenderer(void)
57 GLfloat tmp_viewport
[4];
60 n
= (GLUnurbsObj
*) malloc(sizeof(GLUnurbsObj
));
67 gluDeleteNurbsRenderer(GLUnurbsObj
* nobj
)
77 gluLoadSamplingMatrices(GLUnurbsObj
* nobj
,
78 const GLfloat modelMatrix
[16],
79 const GLfloat projMatrix
[16], const GLint viewport
[4])
85 gluNurbsProperty(GLUnurbsObj
* nobj
, GLenum property
, GLfloat value
)
91 gluGetNurbsProperty(GLUnurbsObj
* nobj
, GLenum property
, GLfloat
* value
)
98 gluBeginCurve(GLUnurbsObj
* nobj
)
104 gluEndCurve(GLUnurbsObj
* nobj
)
110 gluNurbsCurve(GLUnurbsObj
* nobj
, GLint nknots
, GLfloat
* knot
,
111 GLint stride
, GLfloat
* ctlarray
, GLint order
, GLenum type
)
117 gluBeginSurface(GLUnurbsObj
* nobj
)
123 gluEndSurface(GLUnurbsObj
* nobj
)
129 gluNurbsSurface(GLUnurbsObj
* nobj
,
130 GLint sknot_count
, GLfloat
* sknot
,
131 GLint tknot_count
, GLfloat
* tknot
,
132 GLint s_stride
, GLint t_stride
,
133 GLfloat
* ctrlarray
, GLint sorder
, GLint torder
, GLenum type
)
139 gluNurbsCallback(GLUnurbsObj
* nobj
, GLenum which
, void (GLCALLBACK
* fn
) ())
144 gluBeginTrim(GLUnurbsObj
* nobj
)
149 gluPwlCurve(GLUnurbsObj
* nobj
, GLint count
, GLfloat
* array
, GLint stride
,
155 gluEndTrim(GLUnurbsObj
* nobj
)