This topic is now archived and is closed to further replies.



Recommended Posts

cody    199
is there any tutorial how to use the nv_evaluators extension? i didnt find good documentation on it. if not could someone post some code how to render a basic textured quad with it? cody

Share this post

Link to post
Share on other sites
cody    199
thx, it is working now, but i dont really know what the parameters to some functions mean exactly.

void (PFNGLMAPCONTROLPOINTSNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points);

ustride? stride between two vectors?
vstride? size of one row?
uorder? number of columns?
vorder? number of rows?
what does packed mean?

void (* PFNGLMAPPARAMETERFVNVPROC) (GLenum target, GLenum pname, const GLfloat *params);

how many values must be in params?
as many as columns?
from the nvidia demo:
glMapParameterfvNV(patch_type, GL_MAP_TESSELLATION_NV, tess);
tess has 4 floats there, but also there are 4 rows and 4 columns.

void (* PFNGLEVALMAPSNVPROC) (GLenum target, GLenum mode);

what does mode do? it is GL_FILL in the nvidia demo, but its not the same as the paramter in glPolygonMode

i have read the nvidia presentations on high order surfaces but these explanations are not exact enough.

Share this post

Link to post
Share on other sites
zedzeek    529
i know youve read this but its all there

type is either FLOAT or DOUBLE. ustride and vstride are the numbers
of basic machine units (typically unsigned bytes) between control
points in the u and v directions. uorder and vorder have the same
meaning they do in the Map2{fd} command. The error INVALID_VALUE
is generated if either uorder or vorder is less than one or greater
than MAX_EVAL_ORDER. The error INVALID_OPERATION is generated if
target is EVAL_TRIANGULAR_2D_NV and uorder is not equal to vorder.
points is a pointer to an array of control points. If target is
EVAL_2D_NV, there are uorder*vorder control points in the array,
and if it is EVAL_TRIANGULAR_2D_NV, there are uorder*(uorder+1)/2
points in the array. If packed is FALSE, control point i,j is
(ustride)i + (vstride)j
basic machine units from points. If target is EVAL_2D_NV, i ranges
from 0 to uorder-1, and j ranges from 0 to vorder-1. If target is
EVAL_TRIANGULAR_2D_NV, i and j range from 0 to uorder-1, and i+j
must be less than or equal to uorder-1.
If packed is TRUE and target is EVAL_2D_NV, control point i,j is
(ustride)(j*uorder + i)

Share this post

Link to post
Share on other sites