我要发帖 回复

新手上路

2

主题

15

积分

0

专家分

:

私信
发表时间 : 2009-3-10 12:27:06 | 浏览 : 1647    评论 : 2
如何使用glunurbsSurface()这个函数给曲面贴纹理,请各位高手帮帮忙呀,先谢啦

最近VR访客

tan_dunming 评论于2009-3-10 14:32:57
Name
gluBeginSurface — delimit a NURBS surface definition

C Specification
void gluBeginSurface(GLUnurbs* nurb);

C Specification
void gluEndSurface(GLUnurbs* nurb);

Parameters
nurb
Specifies the NURBS object (created with gluNewNurbsRenderer).

Description
Use gluBeginSurface to mark the beginning of a NURBS surface definition. After calling gluBeginSurface, make one or more calls to gluNurbsSurface to define the attributes of the surface. Exactly one of these calls to gluNurbsSurface must have a surface type of GLU_MAP2_VERTEX_3 or GLU_MAP2_VERTEX_4. To mark the end of the NURBS surface definition, call gluEndSurface.

Trimming of NURBS surfaces is supported with gluBeginTrim, gluPwlCurve, gluNurbsCurve, and gluEndTrim. See the gluBeginTrim reference page for details.

GL evaluators are used to render the NURBS surface as a set of polygons. Evaluator state is preserved during rendering with glPushAttrib(GLU_EVAL_BIT) and glPopAttrib. See the glPushAttrib reference page for details on exactly what state these calls preserve.

EXAMPLE
The following commands render a textured NURBS surface with normals; the texture coordinates and normals are also described as NURBS surfaces:

gluBeginSurface(nobj);
   gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2);
   gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL);
   gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4);
gluEndSurface(nobj);
            
See Also
gluBeginCurve, gluBeginTrim, gluNewNurbsRenderer, gluNurbsCurve, gluNurbsSurface, gluPwlCurve, glPushAttrib

Copyright
Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License.
追求卓越
lanbai 评论于2009-3-10 17:05:15
谢谢楼上的,但我是想知道gluNurbsSurface()这个函数的具体用法,参数怎么取。gluNurbsSurface(nobj, ..., GL_MAP2_VERTEX_4)这个用法我知道,但不知道gluNurbsSurface(nobj, ..., GL_MAP2_TEXTURE_COORD_2)与gluNurbsSurface(nobj, ..., GL_MAP2_NORMAL)的具体用法。希望高手赐教,谢谢。

手机版|VR开发网 统计 津ICP备18009691号
网安备12019202000257

GMT+8, 2022-1-19 12:05 PM

返回顶部