15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci NV_evaluators 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_NV_evaluators 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Matt Craighead, NVIDIA Corporation (mcraighead 'at' nvidia.com) 125bd8deadSopenharmony_ci Mark J. Kilgard, NVIDIA Corporation (mjk 'at' nvidia.com) 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciNotice 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci Copyright NVIDIA Corporation, 2000, 2001. 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciIP Status 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci NVIDIA Proprietary. 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciStatus 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Discontinued. 255bd8deadSopenharmony_ci 265bd8deadSopenharmony_ci NVIDIA no longer supports this extension in driver updates after 275bd8deadSopenharmony_ci November 2002. Instead, use conventional OpenGL evaluators or 285bd8deadSopenharmony_ci tessellate surfaces within your application. 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ciVersion 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci NVIDIA Date: January 3, 2003 335bd8deadSopenharmony_ci $Date$ $Revision$ 345bd8deadSopenharmony_ci $Id: //sw/main/docs/OpenGL/specs/old/GL_NV_evaluators.txt#2 $ 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci 225 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci Written based on the wording of the OpenGL 1.2.1 specification. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci Assumes support for the ARB_multitexture extension. 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci NV_vertex_program affects the definition of this extension. 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ciOverview 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci OpenGL evaluators provide applications with the capability to 515bd8deadSopenharmony_ci specify polynomial or rational curves and surfaces using control 525bd8deadSopenharmony_ci points relative to the Bezier basis. The curves and surfaces are 535bd8deadSopenharmony_ci then drawn by evaluating the polynomials provided at various values 545bd8deadSopenharmony_ci for the u parameter of a curve or the (u,v) parameters of a surface. 555bd8deadSopenharmony_ci A tensor product formulation is used for the surfaces. 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ci For various historical reasons, evaluators have not been 585bd8deadSopenharmony_ci particularly popular as an interface for drawing curves and surfaces. 595bd8deadSopenharmony_ci This extension proposes a new interface for surfaces that provides a 605bd8deadSopenharmony_ci number of significant enhancements to the functionality provided by 615bd8deadSopenharmony_ci the original OpenGL evaluators. 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Many implementations never optimized evaluators, so applications 645bd8deadSopenharmony_ci often implemented their own algorithms instead. This extension 655bd8deadSopenharmony_ci relaxes some restrictions that make it difficult to optimize 665bd8deadSopenharmony_ci evaluators. 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci Also, new vertex attributes have been added to OpenGL through 695bd8deadSopenharmony_ci extensions, including multiple sets of texture coordinates, a 705bd8deadSopenharmony_ci secondary color, a fog coordinate, a vertex weight, and others. 715bd8deadSopenharmony_ci The extensions which added these vertex attributes never bothered 725bd8deadSopenharmony_ci to update the functionality of evaluators, since they were used so 735bd8deadSopenharmony_ci little in the first place. In turn, evaluators have become more and 745bd8deadSopenharmony_ci more out of date, making it even less likely that developers will 755bd8deadSopenharmony_ci want to use them. Most of the attributes are not a big loss, but 765bd8deadSopenharmony_ci support for multiple sets of texture coordinates would be absolutely 775bd8deadSopenharmony_ci essential to developers considering the use of evaluators. 785bd8deadSopenharmony_ci 795bd8deadSopenharmony_ci OpenGL evaluators only support rectangular patches, not triangular 805bd8deadSopenharmony_ci patches. Although triangular patches can be converted into 815bd8deadSopenharmony_ci rectangular patches, direct support for triangular patches is likely 825bd8deadSopenharmony_ci to be more efficient. 835bd8deadSopenharmony_ci 845bd8deadSopenharmony_ci The tessellation algorithm used is too inflexible for most purposes; 855bd8deadSopenharmony_ci only the number of rows and columns can be specified. Adjacent 865bd8deadSopenharmony_ci patches must then have identical numbers of rows and columns, or 875bd8deadSopenharmony_ci severe cracking will occur. Ideally, a number of subdivisions could 885bd8deadSopenharmony_ci be specified for all four sides of a rectangular patch and for all 895bd8deadSopenharmony_ci three of a triangular patch. This extension goes one step further 905bd8deadSopenharmony_ci and allows those numbers to be specified in floating-point, providing 915bd8deadSopenharmony_ci a mechanism for smoothly changing the level of detail of the surface. 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci Meshes evaluated with EvalMesh are required to match up exactly 945bd8deadSopenharmony_ci with equivalent meshes evaluated with EvalCoord or EvalPoint. 955bd8deadSopenharmony_ci This makes it difficult or impossible to use optimizations such as 965bd8deadSopenharmony_ci forward differencing. 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci Finally, little attention is given to some of the difficult problems 995bd8deadSopenharmony_ci that can arise when multiple patches are drawn. Depending on the 1005bd8deadSopenharmony_ci way evaluators are implemented, and depending on the orientation of 1015bd8deadSopenharmony_ci edges, numerical accuracy problems can cause cracks to appear between 1025bd8deadSopenharmony_ci patches with the same boundary control points. This extension makes 1035bd8deadSopenharmony_ci guarantees that an edge shared between two patches will match up 1045bd8deadSopenharmony_ci exactly under certain conditions. 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ciIssues 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci * Should one-dimensional evaluators be supported? 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci RESOLVED: No. This extension is intended for surfaces only. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ci * Should we support triangular patches? 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci RESOLVED: Yes. Otherwise, applications will have to convert 1155bd8deadSopenharmony_ci them to rectangular patches themselves. We can do this more 1165bd8deadSopenharmony_ci efficiently. 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci * What domain should triangular patches be defined on? 1195bd8deadSopenharmony_ci 1205bd8deadSopenharmony_ci RESOLVED: (0,0),(1,0),(0,1). 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci * What memory layout should we use for triangular patch control 1235bd8deadSopenharmony_ci points? 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ci RESOLVED: Both a[i][j], where i+j <= n, and a packed format are 1265bd8deadSopenharmony_ci supported. 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci * Is it worth it to have "evaluator objects"? 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci RESOLVED: No. We will leave these out for now. 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ci * Should we support the original evaluators' ability to specify 1335bd8deadSopenharmony_ci a map from an arbitrary (u1,v1) to an arbitrary (u2,v2)? 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci RESOLVED: No. Maps will always extend from (0,0) to (1,1) 1365bd8deadSopenharmony_ci and will always be evaluated from (0,0) to (1,1). 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci * Should the new interface support an EvalCoord-like syntax? 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci RESOLVED: No. We are only interested in evaluating an entire 1415bd8deadSopenharmony_ci mesh at once. 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci * Should we support the "mode" parameter to the existing EvalMesh2, 1445bd8deadSopenharmony_ci which allows the mesh to be tessellated in wireframe or as points? 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci RESOLVED: No. We will leave in the parameter and require that 1475bd8deadSopenharmony_ci it be FILL, though, to leave room for a future extension. 1485bd8deadSopenharmony_ci 1495bd8deadSopenharmony_ci * Should there be a new interface to specify control points or should 1505bd8deadSopenharmony_ci Map2{fd} be reused? 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ci RESOLVED: A new interface. There are enough changes compared to 1535bd8deadSopenharmony_ci the original evaluators that we can't reuse the old interface 1545bd8deadSopenharmony_ci without causing more problems. For example, the target 1555bd8deadSopenharmony_ci parameter of Map2{fd} is really a cross of target and index 1565bd8deadSopenharmony_ci in MapControlPointsNV, and so it ends up creating an excessive 1575bd8deadSopenharmony_ci number of enumerants. 1585bd8deadSopenharmony_ci 1595bd8deadSopenharmony_ci * How should grids be specified? 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci RESOLVED: A MapParameter command. This is better than a new 1625bd8deadSopenharmony_ci MapGrid- style command because it can be extended to include 1635bd8deadSopenharmony_ci new parameter types. 1645bd8deadSopenharmony_ci 1655bd8deadSopenharmony_ci * Should there be any rules about the order of generation of 1665bd8deadSopenharmony_ci primitives within a single patch? 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci RESOLVED: No. The tessellation algorithm itself is not even 1695bd8deadSopenharmony_ci specified, so it makes no sense to do this. Applications must 1705bd8deadSopenharmony_ci not depend on the order in which the primitives are drawn. 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci * Should the stride for MapControlPointsNV be specified in basic 1735bd8deadSopenharmony_ci machine units (i.e. unsigned bytes) or in floats/doubles? 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci RESOLVED: ubytes. Most of the rest of OpenGL (vertex arrays, 1765bd8deadSopenharmony_ci pixel path, etc.) uses ubytes; evaluators are actually 1775bd8deadSopenharmony_ci inconsistent. 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci * How much leeway should implementations be given to choose their own 1805bd8deadSopenharmony_ci algorithm for tessellation? 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci RESOLVED: The integral tessellation scheme will require a 1835bd8deadSopenharmony_ci specific tessellation of the boundary edges of the patch, but the 1845bd8deadSopenharmony_ci interior tessellation is implementation-specific. The fractional 1855bd8deadSopenharmony_ci tessellation scheme will only require a minimum number of segments 1865bd8deadSopenharmony_ci along each edge. In either case, a minimum number of triangles 1875bd8deadSopenharmony_ci for the entire patch is specified. 1885bd8deadSopenharmony_ci 1895bd8deadSopenharmony_ci * Should there be rules to ensure that the triangles will be 1905bd8deadSopenharmony_ci oriented in a consistent fashion? 1915bd8deadSopenharmony_ci 1925bd8deadSopenharmony_ci RESOLVED: Yes. This is essential for features such as backface 1935bd8deadSopenharmony_ci culling to work properly. The rule given ensures that the 1945bd8deadSopenharmony_ci orientation will be identical to the orientation used for the 1955bd8deadSopenharmony_ci original evaluators. 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci * Should there be a separate MAX_EVAL_ORDER for rational surfaces? 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci RESOLVED: Yes. Rational surfaces require additional calculation to 2005bd8deadSopenharmony_ci be done by the implementation, especially if AUTO_NORMAL is 2015bd8deadSopenharmony_ci enabled. Furthermore, the most useful rational surfaces are of low 2025bd8deadSopenharmony_ci order. For example, all the conic sections are quadratic rational 2035bd8deadSopenharmony_ci surfaces. 2045bd8deadSopenharmony_ci 2055bd8deadSopenharmony_ci * Should there be enables similar to AUTO_NORMAL that generate 2065bd8deadSopenharmony_ci partials of U (tangents), partials of V, and/or binormals? 2075bd8deadSopenharmony_ci 2085bd8deadSopenharmony_ci RESOLVED: No. The application is responsible for configuring 2095bd8deadSopenharmony_ci the evaluators appropriately. 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci The auto normal functionality is supported because it is fairly 2125bd8deadSopenharmony_ci complicated and was already a core part of OpenGL for evaluators. 2135bd8deadSopenharmony_ci Plus there is already a "normal" vertex attribute for it to 2145bd8deadSopenharmony_ci automatically generate. 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci The partials of U and partials of V are fairly straightforward 2175bd8deadSopenharmony_ci to evaluate (just take the derivative of the bivariate polynomial 2185bd8deadSopenharmony_ci in terms of either U or V) plus there is not a particular vertex 2195bd8deadSopenharmony_ci attribute associated with each of these. 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ciNew Procedures and Functions 2225bd8deadSopenharmony_ci 2235bd8deadSopenharmony_ci void MapControlPointsNV(enum target, uint index, enum type, 2245bd8deadSopenharmony_ci sizei ustride, sizei vstride, 2255bd8deadSopenharmony_ci int uorder, int vorder, 2265bd8deadSopenharmony_ci boolean packed, 2275bd8deadSopenharmony_ci const void *points) 2285bd8deadSopenharmony_ci 2295bd8deadSopenharmony_ci void MapParameterivNV(enum target, enum pname, const int *params) 2305bd8deadSopenharmony_ci void MapParameterfvNV(enum target, enum pname, const float *params) 2315bd8deadSopenharmony_ci 2325bd8deadSopenharmony_ci void GetMapControlPointsNV(enum target, uint index, enum type, 2335bd8deadSopenharmony_ci sizei ustride, sizei vstride, 2345bd8deadSopenharmony_ci boolean packed, void *points) 2355bd8deadSopenharmony_ci 2365bd8deadSopenharmony_ci void GetMapParameterivNV(enum target, enum pname, int *params) 2375bd8deadSopenharmony_ci void GetMapParameterfvNV(enum target, enum pname, float *params) 2385bd8deadSopenharmony_ci void GetMapAttribParameterivNV(enum target, uint index, enum pname, 2395bd8deadSopenharmony_ci int *params) 2405bd8deadSopenharmony_ci void GetMapAttribParameterfvNV(enum target, uint index, enum pname, 2415bd8deadSopenharmony_ci float *params) 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci void EvalMapsNV(enum target, enum mode) 2445bd8deadSopenharmony_ci 2455bd8deadSopenharmony_ciNew Tokens 2465bd8deadSopenharmony_ci 2475bd8deadSopenharmony_ci Accepted by the <target> parameter of MapControlPointsNV, 2485bd8deadSopenharmony_ci MapParameter[if]vNV, GetMapControlPointsNV, GetMapParameter[if]vNV, 2495bd8deadSopenharmony_ci GetMapAttribParameter[if]vNV, and EvalMapsNV: 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci EVAL_2D_NV 0x86C0 2525bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV 0x86C1 2535bd8deadSopenharmony_ci 2545bd8deadSopenharmony_ci Accepted by the <pname> parameter of MapParameter[if]vNV and 2555bd8deadSopenharmony_ci GetMapParameter[if]vNV: 2565bd8deadSopenharmony_ci 2575bd8deadSopenharmony_ci MAP_TESSELLATION_NV 0x86C2 2585bd8deadSopenharmony_ci 2595bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetMapAttribParameter[if]vNV: 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci MAP_ATTRIB_U_ORDER_NV 0x86C3 2625bd8deadSopenharmony_ci MAP_ATTRIB_V_ORDER_NV 0x86C4 2635bd8deadSopenharmony_ci 2645bd8deadSopenharmony_ci Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, 2655bd8deadSopenharmony_ci and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, 2665bd8deadSopenharmony_ci and GetDoublev: 2675bd8deadSopenharmony_ci 2685bd8deadSopenharmony_ci EVAL_FRACTIONAL_TESSELLATION_NV 0x86C5 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB0_NV 0x86C6 2715bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB1_NV 0x86C7 2725bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB2_NV 0x86C8 2735bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB3_NV 0x86C9 2745bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB4_NV 0x86CA 2755bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB5_NV 0x86CB 2765bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB6_NV 0x86CC 2775bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB7_NV 0x86CD 2785bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB8_NV 0x86CE 2795bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB9_NV 0x86CF 2805bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB10_NV 0x86D0 2815bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB11_NV 0x86D1 2825bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB12_NV 0x86D2 2835bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB13_NV 0x86D3 2845bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB14_NV 0x86D4 2855bd8deadSopenharmony_ci EVAL_VERTEX_ATTRIB15_NV 0x86D5 2865bd8deadSopenharmony_ci 2875bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, 2885bd8deadSopenharmony_ci GetFloatv, and GetDoublev: 2895bd8deadSopenharmony_ci 2905bd8deadSopenharmony_ci MAX_MAP_TESSELLATION_NV 0x86D6 2915bd8deadSopenharmony_ci MAX_RATIONAL_EVAL_ORDER_NV 0x86D7 2925bd8deadSopenharmony_ci 2935bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 2945bd8deadSopenharmony_ci 2955bd8deadSopenharmony_ci None. 2965bd8deadSopenharmony_ci 2975bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci None. 3005bd8deadSopenharmony_ci 3015bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations 3025bd8deadSopenharmony_ciand the Frame Buffer) 3035bd8deadSopenharmony_ci 3045bd8deadSopenharmony_ci None. 3055bd8deadSopenharmony_ci 3065bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 3075bd8deadSopenharmony_ci 3085bd8deadSopenharmony_ci -- NEW Section 5.7 "General Evaluators" 3095bd8deadSopenharmony_ci 3105bd8deadSopenharmony_ci "General evaluators are similar to evaluators in that they can 3115bd8deadSopenharmony_ci be used to evaluate polynomial and rational mappings, but general 3125bd8deadSopenharmony_ci evaluators have several new features that the original evaluators 3135bd8deadSopenharmony_ci do not. First, they support triangular surfaces in addition to 3145bd8deadSopenharmony_ci (quadrilateral) tensor product surfaces. Second, the tessellation 3155bd8deadSopenharmony_ci can be varied continuously as well as in integral steps. Finally, 3165bd8deadSopenharmony_ci general evaluators can evaluate all vertex attributes, not just the 3175bd8deadSopenharmony_ci vertex, color, normal, and texture coordinates. 3185bd8deadSopenharmony_ci 3195bd8deadSopenharmony_ci Several elements of the original evaluators have been removed in 3205bd8deadSopenharmony_ci the general evaluators interface. The general evaluators always 3215bd8deadSopenharmony_ci evaluate four components in parallel, whereas the original evaluators 3225bd8deadSopenharmony_ci might evaluate between 1 and 4 (see the "k" column in Table 5.1 on 3235bd8deadSopenharmony_ci page 165). The original evaluators can map on an arbitrary domain 3245bd8deadSopenharmony_ci and can map grids on an arbitrary region, whereas the general 3255bd8deadSopenharmony_ci evaluators only use the [0,1] range. Support for 1D evaluators, 3265bd8deadSopenharmony_ci an EvalCoord-style interface, and the "mode" parameter of EvalMesh* 3275bd8deadSopenharmony_ci has also been removed from the general evaluators. 3285bd8deadSopenharmony_ci 3295bd8deadSopenharmony_ci The command 3305bd8deadSopenharmony_ci 3315bd8deadSopenharmony_ci void MapControlPointsNV(enum target, uint index, enum type, 3325bd8deadSopenharmony_ci sizei ustride, sizei vstride, 3335bd8deadSopenharmony_ci int uorder, int vorder, boolean packed, 3345bd8deadSopenharmony_ci const void *points); 3355bd8deadSopenharmony_ci 3365bd8deadSopenharmony_ci specifies control points for a general evaluator map. target 3375bd8deadSopenharmony_ci is the type of evaluator map and can be either EVAL_2D_NV or 3385bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV. index is the number of the vertex attribute 3395bd8deadSopenharmony_ci register the map will be used to evaluate for; these are the same 3405bd8deadSopenharmony_ci indices used in the GL_NV_vertex_program extension. Table X.1 3415bd8deadSopenharmony_ci shows the relationship between these indices and the conventional 3425bd8deadSopenharmony_ci per-vertex attributes for implementations that do not support 3435bd8deadSopenharmony_ci GL_NV_vertex_program. 3445bd8deadSopenharmony_ci 3455bd8deadSopenharmony_ciVertex 3465bd8deadSopenharmony_ciAttribute Conventional Conventional 3475bd8deadSopenharmony_ciRegister Per-vertex Conventional Component 3485bd8deadSopenharmony_ciNumber Parameter Per-vertex Parameter Command Mapping 3495bd8deadSopenharmony_ci--------- --------------- -------------------------------------- ------------ 3505bd8deadSopenharmony_ci 0 vertex position Vertex x,y,z,w 3515bd8deadSopenharmony_ci 1 vertex weights VertexWeightEXT w,0,0,1 3525bd8deadSopenharmony_ci 2 normal Normal x,y,z,1 3535bd8deadSopenharmony_ci 3 primary color Color r,g,b,a 3545bd8deadSopenharmony_ci 4 secondary color SecondaryColorEXT r,g,b,1 3555bd8deadSopenharmony_ci 5 fog coordinate FogCoordEXT fc,0,0,1 3565bd8deadSopenharmony_ci 6 - - - 3575bd8deadSopenharmony_ci 7 - - - 3585bd8deadSopenharmony_ci 8 texture coord 0 MultiTexCoordARB(GL_TEXTURE0_ARB, ...) s,t,r,q 3595bd8deadSopenharmony_ci 9 texture coord 1 MultiTexCoordARB(GL_TEXTURE1_ARB, ...) s,t,r,q 3605bd8deadSopenharmony_ci 10 texture coord 2 MultiTexCoordARB(GL_TEXTURE2_ARB, ...) s,t,r,q 3615bd8deadSopenharmony_ci 11 texture coord 3 MultiTexCoordARB(GL_TEXTURE3_ARB, ...) s,t,r,q 3625bd8deadSopenharmony_ci 12 texture coord 4 MultiTexCoordARB(GL_TEXTURE4_ARB, ...) s,t,r,q 3635bd8deadSopenharmony_ci 13 texture coord 5 MultiTexCoordARB(GL_TEXTURE5_ARB, ...) s,t,r,q 3645bd8deadSopenharmony_ci 14 texture coord 6 MultiTexCoordARB(GL_TEXTURE6_ARB, ...) s,t,r,q 3655bd8deadSopenharmony_ci 15 texture coord 7 MultiTexCoordARB(GL_TEXTURE7_ARB, ...) s,t,r,q 3665bd8deadSopenharmony_ci 3675bd8deadSopenharmony_ciTable X.1: Aliasing of vertex attributes with conventional per-vertex 3685bd8deadSopenharmony_ciparameters. 3695bd8deadSopenharmony_ci 3705bd8deadSopenharmony_ci type is either FLOAT or DOUBLE. ustride and vstride are the numbers 3715bd8deadSopenharmony_ci of basic machine units (typically unsigned bytes) between control 3725bd8deadSopenharmony_ci points in the u and v directions. uorder and vorder have the same 3735bd8deadSopenharmony_ci meaning they do in the Map2{fd} command. The error INVALID_VALUE 3745bd8deadSopenharmony_ci is generated if either uorder or vorder is less than one or greater 3755bd8deadSopenharmony_ci than MAX_EVAL_ORDER. The error INVALID_OPERATION is generated if 3765bd8deadSopenharmony_ci target is EVAL_TRIANGULAR_2D_NV and uorder is not equal to vorder. 3775bd8deadSopenharmony_ci 3785bd8deadSopenharmony_ci points is a pointer to an array of control points. If target is 3795bd8deadSopenharmony_ci EVAL_2D_NV, there are uorder*vorder control points in the array, 3805bd8deadSopenharmony_ci and if it is EVAL_TRIANGULAR_2D_NV, there are uorder*(uorder+1)/2 3815bd8deadSopenharmony_ci points in the array. If packed is FALSE, control point i,j is 3825bd8deadSopenharmony_ci located 3835bd8deadSopenharmony_ci 3845bd8deadSopenharmony_ci (ustride)i + (vstride)j 3855bd8deadSopenharmony_ci 3865bd8deadSopenharmony_ci basic machine units from points. If target is EVAL_2D_NV, i ranges 3875bd8deadSopenharmony_ci from 0 to uorder-1, and j ranges from 0 to vorder-1. If target is 3885bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV, i and j range from 0 to uorder-1, and i+j 3895bd8deadSopenharmony_ci must be less than or equal to uorder-1. 3905bd8deadSopenharmony_ci 3915bd8deadSopenharmony_ci If packed is TRUE and target is EVAL_2D_NV, control point i,j is 3925bd8deadSopenharmony_ci located 3935bd8deadSopenharmony_ci 3945bd8deadSopenharmony_ci (ustride)(j*uorder + i) 3955bd8deadSopenharmony_ci 3965bd8deadSopenharmony_ci basic machine units from points. If packed is TRUE and target is 3975bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV, control point i,j is located 3985bd8deadSopenharmony_ci 3995bd8deadSopenharmony_ci (ustride)(j*uorder + i - j*(j-1)/2) 4005bd8deadSopenharmony_ci 4015bd8deadSopenharmony_ci basic machine units from points. 4025bd8deadSopenharmony_ci 4035bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if index is 0, one of the 4045bd8deadSopenharmony_ci control points' fourth components is not equal to 1, and either uorder 4055bd8deadSopenharmony_ci of vorder is greater than MAX_RATIONAL_EVAL_ORDER_NV. 4065bd8deadSopenharmony_ci 4075bd8deadSopenharmony_ci The evaluation of a 2D tensor product map is performed in the same 4085bd8deadSopenharmony_ci way as for the original evaluators. The exact coordinates produced 4095bd8deadSopenharmony_ci by the original evaluators may differ from those produced by the 4105bd8deadSopenharmony_ci general evaluators, since different algorithms may be used. 4115bd8deadSopenharmony_ci 4125bd8deadSopenharmony_ci A triangular map may be evaluated as follows. Let Ri,j be the 4135bd8deadSopenharmony_ci 4-component vector for control point i,j and n be the degree of the 4145bd8deadSopenharmony_ci patch (i.e. uorder-1). Then: 4155bd8deadSopenharmony_ci 4165bd8deadSopenharmony_ci --- 4175bd8deadSopenharmony_ci \ (n) (n-i) i j n-i-j 4185bd8deadSopenharmony_ci p_t(u,v) = / (i) ( j ) u v (1-u-v) Ri,j 4195bd8deadSopenharmony_ci --- 4205bd8deadSopenharmony_ci i,j >= 0 4215bd8deadSopenharmony_ci i+j <= n 4225bd8deadSopenharmony_ci 4235bd8deadSopenharmony_ci evaluates the point p_t(u,v) on the triangular patch at parameter 4245bd8deadSopenharmony_ci values (u,v). (The notation on the left indicates "n choose i" and 4255bd8deadSopenharmony_ci "n minus i choose j", i.e., binomial coefficients.) 4265bd8deadSopenharmony_ci 4275bd8deadSopenharmony_ci The evaluation of any particular attribute can be enabled or disabled 4285bd8deadSopenharmony_ci with Enable and Disable using one of the EVAL_VERTEX_ATTRIBi_NV 4295bd8deadSopenharmony_ci constants. 4305bd8deadSopenharmony_ci 4315bd8deadSopenharmony_ci If AUTO_NORMAL is enabled (see section 5.1), analytically computed 4325bd8deadSopenharmony_ci normals are evaluated as well. The formula for the normal is the same 4335bd8deadSopenharmony_ci as the one in section 5.1, except that the magnitude of the normals is 4345bd8deadSopenharmony_ci undefined. These normals should be renormalized by enabling NORMALIZE, 4355bd8deadSopenharmony_ci or by normalizing them in a vertex program. The w of the normal 4365bd8deadSopenharmony_ci vertex attribute will always be 1. 4375bd8deadSopenharmony_ci 4385bd8deadSopenharmony_ci The commands 4395bd8deadSopenharmony_ci 4405bd8deadSopenharmony_ci void MapParameter{if}vNV(enum target, enum pname, T params); 4415bd8deadSopenharmony_ci 4425bd8deadSopenharmony_ci can be used to specify the level of tessellation to evaluate, 4435bd8deadSopenharmony_ci where target is EVAL_2D_NV or EVAL_TRIANGULAR_2D_NV and pname is 4445bd8deadSopenharmony_ci MAP_TESSELLATION_NV. If target is EVAL_2D_NV, params contains the 4455bd8deadSopenharmony_ci four values [nu0,nu1,nv0,nv1], and if it is EVAL_TRIANGULAR_2D_NV, 4465bd8deadSopenharmony_ci params contains the three values [n1,n2,n3]. The state for each 4475bd8deadSopenharmony_ci target is independent of the other. These values are clamped to 4485bd8deadSopenharmony_ci the range [1.0, MAX_MAP_TESSELLATION_NV]. 4495bd8deadSopenharmony_ci 4505bd8deadSopenharmony_ci The use of a fractional tessellation algorithm can be 4515bd8deadSopenharmony_ci enabled or disabled with Enable and Disable using the 4525bd8deadSopenharmony_ci EVAL_FRACTIONAL_TESSELLATION_NV constant. The fractional tessellation 4535bd8deadSopenharmony_ci algorithm allows the tessellation to smoothly morph without popping 4545bd8deadSopenharmony_ci as the tessellation parameters are varied by small amounts. 4555bd8deadSopenharmony_ci 4565bd8deadSopenharmony_ci The command 4575bd8deadSopenharmony_ci 4585bd8deadSopenharmony_ci void EvalMapsNV(enum target, enum mode); 4595bd8deadSopenharmony_ci 4605bd8deadSopenharmony_ci evaluates the currently enabled maps. target is either EVAL_2D_NV 4615bd8deadSopenharmony_ci or EVAL_TRIANGULAR_2D and specifies which set of maps to evaluate. 4625bd8deadSopenharmony_ci mode must be FILL. If EVAL_VERTEX_ATTRIB0_NV is not enabled, the 4635bd8deadSopenharmony_ci error INVALID_OPERATION results. 4645bd8deadSopenharmony_ci 4655bd8deadSopenharmony_ci If EVAL_FRACTIONAL_TESSELLATION_NV is disabled, tensor product maps 4665bd8deadSopenharmony_ci are evaluated such that the boundaries of the mesh are divided into 4675bd8deadSopenharmony_ci ceil(nu0) segments on the edge from (0,0) to (1,0), ceil(nu1) segments 4685bd8deadSopenharmony_ci on the edge from (0,1) to (1,1), ceil(nv0) segments on the edge from 4695bd8deadSopenharmony_ci (0,0) to (0,1), and ceil(nv1) segments on the edge from (1,0) to 4705bd8deadSopenharmony_ci (1,1). These segments must be evaluated at equal spacings in (u,v) 4715bd8deadSopenharmony_ci parameter space. 4725bd8deadSopenharmony_ci 4735bd8deadSopenharmony_ci Triangular maps are evaluated such that the boundary of the mesh from 4745bd8deadSopenharmony_ci (0,0) to (1,0) has ceil(n1) equally-spaced segments, the boundary 4755bd8deadSopenharmony_ci from (1,0) to (0,1) has ceil(n2) equally-spaced segments, and the 4765bd8deadSopenharmony_ci boundary from (0,1) to (0,0) has ceil(n3) equally-spaced segments. 4775bd8deadSopenharmony_ci 4785bd8deadSopenharmony_ci If EVAL_FRACTIONAL_TESSELLATION_NV is enabled, each edge must be 4795bd8deadSopenharmony_ci tessellated with no fewer the number of segments that would be used in 4805bd8deadSopenharmony_ci the non- fractional case for any values of the tessellation parameters. 4815bd8deadSopenharmony_ci Furthermore, the tessellation of each edge must vary smoothly with the 4825bd8deadSopenharmony_ci parameters; that is, a small change in any or all of the parameters 4835bd8deadSopenharmony_ci must cause a small change in the tessellation. Whenever a new vertex 4845bd8deadSopenharmony_ci is introduced into the tessellation, it must be coincident with another 4855bd8deadSopenharmony_ci vertex, and whenever a vertex is removed, it must have been coincident 4865bd8deadSopenharmony_ci with a different vertex. The parameter-space position of any vertex 4875bd8deadSopenharmony_ci must be a continuous function of the tessellation parameters. 4885bd8deadSopenharmony_ci 4895bd8deadSopenharmony_ci The same minimum triangle requirements apply to fractional 4905bd8deadSopenharmony_ci tessellations as to integral tessellations. 4915bd8deadSopenharmony_ci 4925bd8deadSopenharmony_ci A tensor product patch must always be tessellated with no fewer than 4935bd8deadSopenharmony_ci 4945bd8deadSopenharmony_ci 2 * ceil((nu0+nu1)/2) * ceil((nv0+nv1)/2) 4955bd8deadSopenharmony_ci 4965bd8deadSopenharmony_ci triangles in total. 4975bd8deadSopenharmony_ci 4985bd8deadSopenharmony_ci A triangular patch must always be tessellated with no fewer than 4995bd8deadSopenharmony_ci 5005bd8deadSopenharmony_ci ceil((n1+n2+n3)/3)^2 5015bd8deadSopenharmony_ci 5025bd8deadSopenharmony_ci triangles in total. 5035bd8deadSopenharmony_ci 5045bd8deadSopenharmony_ci If a triangle is formed by evaluating the maps at the three 5055bd8deadSopenharmony_ci coordinates (u1,v1), (u2,v2), and (u3,v3), it must be true that 5065bd8deadSopenharmony_ci 5075bd8deadSopenharmony_ci (u3-u1)*(v2-v1) - (u2-u1)*(v3-v1) >= 0 5085bd8deadSopenharmony_ci 5095bd8deadSopenharmony_ci to ensure that all triangles in a patch have a consistent 5105bd8deadSopenharmony_ci orientation. 5115bd8deadSopenharmony_ci 5125bd8deadSopenharmony_ci The current value of any vertex attribute for which the evaluation 5135bd8deadSopenharmony_ci of a map is enabled becomes undefined after an EvalMapsNV command. 5145bd8deadSopenharmony_ci If AUTO_NORMAL is enabled, the current normal becomes undefined as 5155bd8deadSopenharmony_ci well. 5165bd8deadSopenharmony_ci 5175bd8deadSopenharmony_ci If AUTO_NORMAL is enabled, the analytically computed normals take 5185bd8deadSopenharmony_ci precedence over the currently enabled map for vertex attribute 2 5195bd8deadSopenharmony_ci (the normal). 5205bd8deadSopenharmony_ci 5215bd8deadSopenharmony_ci To prevent cracks, certain rules must be established for performing 5225bd8deadSopenharmony_ci the evaluations. The goal of these rules is to ensure that no 5235bd8deadSopenharmony_ci matter what order control points are specified in and what the 5245bd8deadSopenharmony_ci tessellation parameters are, so long as the control points on any edge 5255bd8deadSopenharmony_ci exactly match the control points of an adjacent edge, and so long as 5265bd8deadSopenharmony_ci the subdivision parameter for that edge is the same for the adjacent 5275bd8deadSopenharmony_ci patch, there will be no cracking artifacts between the two patches. 5285bd8deadSopenharmony_ci These requirements are completely independent of numerical precision. 5295bd8deadSopenharmony_ci In particular, we will require that these shared vertices' positions 5305bd8deadSopenharmony_ci be equal. Furthermore, there must be no cracking inside the geometry 5315bd8deadSopenharmony_ci of any patch, and normals must not change in a discontinuous fashion 5325bd8deadSopenharmony_ci so that there are no discontinuities in lighting or other effects 5335bd8deadSopenharmony_ci that use the normal. 5345bd8deadSopenharmony_ci 5355bd8deadSopenharmony_ci Let two patches share an edge of equal order (the order of an edge is 5365bd8deadSopenharmony_ci the order of the patch in that direction for a tensor product patch, 5375bd8deadSopenharmony_ci or the order of the patch for a triangular patch). Then this edge is 5385bd8deadSopenharmony_ci said to be consistent if all the vertex control points (vertex 5395bd8deadSopenharmony_ci attribute 0) are identical on each edge (although they may be specified 5405bd8deadSopenharmony_ci in the opposite direction, or even in a different coordinate; one may 5415bd8deadSopenharmony_ci an edge in the u direction, and one may be an edge in the v direction). 5425bd8deadSopenharmony_ci 5435bd8deadSopenharmony_ci If an edge is consistent, and if each of the two patches are 5445bd8deadSopenharmony_ci tessellated with identical tessellation parameters for that edge, 5455bd8deadSopenharmony_ci then the vertex coordinates given to vertex processing must be 5465bd8deadSopenharmony_ci exactly equal for each of the vertices. 5475bd8deadSopenharmony_ci 5485bd8deadSopenharmony_ci The vertex coordinates given to vertex processing for the corner 5495bd8deadSopenharmony_ci vertices of any patch must be exactly equal to the values of the 5505bd8deadSopenharmony_ci corner control points of that patch, regardless of the patch's 5515bd8deadSopenharmony_ci order, type, tessellation parameters, the state of the AUTO_NORMAL or 5525bd8deadSopenharmony_ci EVAL_FRACTIONAL_TESSELLATION_NV enables, the control points, order, 5535bd8deadSopenharmony_ci or enable of any other associated map, or any other OpenGL state. 5545bd8deadSopenharmony_ci 5555bd8deadSopenharmony_ci The vertex coordinates and normals given to vertex processing for 5565bd8deadSopenharmony_ci any vertex of a patch must be exactly equal each time that vertex 5575bd8deadSopenharmony_ci is evaluated during the tessellation of a patch. Since each vertex 5585bd8deadSopenharmony_ci is shared between several triangles in the patch, any variation in 5595bd8deadSopenharmony_ci these coordinates and normals would result in cracks or lighting 5605bd8deadSopenharmony_ci discontinuities. 5615bd8deadSopenharmony_ci 5625bd8deadSopenharmony_ci The state required for the general evaluators consists of a bit 5635bd8deadSopenharmony_ci indicating whether fractional tessellation is enabled or disabled, 16 5645bd8deadSopenharmony_ci bits indicating whether the evaluation of each vertex attribute is 5655bd8deadSopenharmony_ci enabled or disabled, four floating-point map tessellation values for 5665bd8deadSopenharmony_ci tensor product patches, three floating-point map tessellation values 5675bd8deadSopenharmony_ci for triangular patches, and a map specification for a tensor product 5685bd8deadSopenharmony_ci patch and a triangular patch for each vertex attribute. A map 5695bd8deadSopenharmony_ci specification consists of two integers indicating the order of the 5705bd8deadSopenharmony_ci map in u and v and a two-dimensional array of vectors of four 5715bd8deadSopenharmony_ci floating-point values containing the control points for that map. 5725bd8deadSopenharmony_ci The initial state of fractional tessellation is disabled. The initial 5735bd8deadSopenharmony_ci state of evaluation of vertex attribute 0 is enabled, and the initial 5745bd8deadSopenharmony_ci state of evaluation for any other vertex attribute is disabled. The 5755bd8deadSopenharmony_ci initial value of the tessellation parameters is 1.0. The initial order 5765bd8deadSopenharmony_ci of each map specification is an order of 1 in both u and v and a 5775bd8deadSopenharmony_ci single control point of [0,0,0,1]." 5785bd8deadSopenharmony_ci 5795bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 5805bd8deadSopenharmony_ci 5815bd8deadSopenharmony_ci -- NEW Section 6.1.13 "General Evaluator Queries" 5825bd8deadSopenharmony_ci 5835bd8deadSopenharmony_ci "The commands 5845bd8deadSopenharmony_ci 5855bd8deadSopenharmony_ci void GetMapParameterivNV(enum target, enum pname, int *params); 5865bd8deadSopenharmony_ci void GetMapParameterfvNV(enum target, enum pname, float *params); 5875bd8deadSopenharmony_ci 5885bd8deadSopenharmony_ci obtain the parameters for a map target. target may be one of 5895bd8deadSopenharmony_ci EVAL_2D_NV or EVAL_TRIANGULAR_2D_NV. pname must be MAP_TESSELLATION_NV. 5905bd8deadSopenharmony_ci The map tessellation is placed in params. 5915bd8deadSopenharmony_ci 5925bd8deadSopenharmony_ci The commands 5935bd8deadSopenharmony_ci 5945bd8deadSopenharmony_ci void GetMapAttribParameterivNV(enum target, uint index, enum pname, 5955bd8deadSopenharmony_ci int *params); 5965bd8deadSopenharmony_ci void GetMapAttribParameterfvNV(enum target, uint index, enum pname, 5975bd8deadSopenharmony_ci float *params); 5985bd8deadSopenharmony_ci 5995bd8deadSopenharmony_ci obtain parameters for a single map. target may be one of EVAL_2D_NV 6005bd8deadSopenharmony_ci or EVAL_TRIANGULAR_2D_NV. index is the number of the vertex attribute 6015bd8deadSopenharmony_ci register the map is used for evaluating. If pname is 6025bd8deadSopenharmony_ci MAP_ATTRIB_U_ORDER_NV, the u order of the map is placed in params. If 6035bd8deadSopenharmony_ci pname is MAP_ATTRIB_V_ORDER_NV, the v order of the map is placed in 6045bd8deadSopenharmony_ci params. 6055bd8deadSopenharmony_ci 6065bd8deadSopenharmony_ci The command 6075bd8deadSopenharmony_ci 6085bd8deadSopenharmony_ci void GetMapControlPointsNV(enum target, uint index, enum type, 6095bd8deadSopenharmony_ci sizei ustride, sizei vstride, boolean packed, 6105bd8deadSopenharmony_ci void *points); 6115bd8deadSopenharmony_ci 6125bd8deadSopenharmony_ci obtains the control points of a map. target may be one of EVAL_2D_NV 6135bd8deadSopenharmony_ci or EVAL_TRIANGULAR_2D_NV. index is the number of the vertex attribute 6145bd8deadSopenharmony_ci register the map is used for evaluating. type is either FLOAT or 6155bd8deadSopenharmony_ci DOUBLE. ustride and vstride are the numbers of basic machine units 6165bd8deadSopenharmony_ci (typically unsigned bytes) between control points in the u and v 6175bd8deadSopenharmony_ci directions. points is a pointer to an array where the control points 6185bd8deadSopenharmony_ci are to be written. If target is EVAL_2D_NV, there are uorder*vorder 6195bd8deadSopenharmony_ci control points in the array, and if it is EVAL_TRIANGULAR_2D_NV, there 6205bd8deadSopenharmony_ci are uorder*(uorder+1)/2 points in the array. If packed is FALSE, 6215bd8deadSopenharmony_ci control point i,j is located 6225bd8deadSopenharmony_ci 6235bd8deadSopenharmony_ci (ustride)i + (vstride)j 6245bd8deadSopenharmony_ci 6255bd8deadSopenharmony_ci basic machine units from points. If packed is TRUE and target is 6265bd8deadSopenharmony_ci EVAL_2D_NV, control point i,j is located 6275bd8deadSopenharmony_ci 6285bd8deadSopenharmony_ci (ustride)(j*uorder + i) 6295bd8deadSopenharmony_ci 6305bd8deadSopenharmony_ci basic machine units from points. If packed is TRUE and target is 6315bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV, control point i,j is located 6325bd8deadSopenharmony_ci 6335bd8deadSopenharmony_ci (ustride)(j*uorder + i - j*(j-1)/2) 6345bd8deadSopenharmony_ci 6355bd8deadSopenharmony_ci basic machine units from points. If target is EVAL_2D_NV, i ranges 6365bd8deadSopenharmony_ci from 0 to uorder-1, and j ranges from 0 to vorder-1. If target is 6375bd8deadSopenharmony_ci EVAL_TRIANGULAR_2D_NV, i and j range from 0 to uorder-1, and i+j 6385bd8deadSopenharmony_ci must be less than or equal to uorder-1." 6395bd8deadSopenharmony_ci 6405bd8deadSopenharmony_ciAdditions to the GLX Specification 6415bd8deadSopenharmony_ci 6425bd8deadSopenharmony_ci Nine new GL commands are added. 6435bd8deadSopenharmony_ci 6445bd8deadSopenharmony_ci The following three rendering commands are sent to the sever 6455bd8deadSopenharmony_ci as part of a glXRender request: 6465bd8deadSopenharmony_ci 6475bd8deadSopenharmony_ci MapParameterivNV 6485bd8deadSopenharmony_ci 2 12+4*n rendering command length 6495bd8deadSopenharmony_ci 2 ???? rendering command opcode 6505bd8deadSopenharmony_ci 4 ENUM target 6515bd8deadSopenharmony_ci 4 ENUM pname 6525bd8deadSopenharmony_ci 0x86C2 GL_MAP_TESSELLATION_NV 6535bd8deadSopenharmony_ci n=3 if (target == GL_EVAL_TRIANGULAR_2D_NV) 6545bd8deadSopenharmony_ci n=4 if (target == GL_EVAL_2D_NV) 6555bd8deadSopenharmony_ci else n=0 command is erroneous 6565bd8deadSopenharmony_ci 4*n LISTofINT32 params 6575bd8deadSopenharmony_ci 6585bd8deadSopenharmony_ci 6595bd8deadSopenharmony_ci MapParameterfvNV 6605bd8deadSopenharmony_ci 2 12+4*n rendering command length 6615bd8deadSopenharmony_ci 2 ???? rendering command opcode 6625bd8deadSopenharmony_ci 4 ENUM target 6635bd8deadSopenharmony_ci 4 ENUM pname 6645bd8deadSopenharmony_ci 0x86C2 GL_MAP_TESSELLATION_NV 6655bd8deadSopenharmony_ci n=3 if (target == GL_EVAL_TRIANGULAR_2D_NV) 6665bd8deadSopenharmony_ci n=4 if (target == GL_EVAL_2D_NV) 6675bd8deadSopenharmony_ci else n=0 command is erroneous 6685bd8deadSopenharmony_ci 4*n LISTofFLOAT32 params 6695bd8deadSopenharmony_ci 6705bd8deadSopenharmony_ci 6715bd8deadSopenharmony_ci EvalMapsNV 6725bd8deadSopenharmony_ci 2 12 rendering command length 6735bd8deadSopenharmony_ci 2 ???? rendering command opcode 6745bd8deadSopenharmony_ci 4 ENUM target 6755bd8deadSopenharmony_ci 4 ENUM mode 6765bd8deadSopenharmony_ci 6775bd8deadSopenharmony_ci The following rendering command is potentially large and can be sent 6785bd8deadSopenharmony_ci in a glXRender or glXRenderLarge request: 6795bd8deadSopenharmony_ci 6805bd8deadSopenharmony_ci MapControlPointsNV 6815bd8deadSopenharmony_ci 2 24+m rendering command length 6825bd8deadSopenharmony_ci 2 ???? rendering command opcode 6835bd8deadSopenharmony_ci 4 ENUM target 6845bd8deadSopenharmony_ci 4 CARD32 index 6855bd8deadSopenharmony_ci 4 CARD32 type 6865bd8deadSopenharmony_ci 4 INT32 uorder 6875bd8deadSopenharmony_ci 4 INT32 vorder 6885bd8deadSopenharmony_ci m (see below) points 6895bd8deadSopenharmony_ci 6905bd8deadSopenharmony_ci Determine m from the table below; n depends on the target. If the 6915bd8deadSopenharmony_ci target is GL_EVAL_2D_NV, then n = uorder*vorder. If the target 6925bd8deadSopenharmony_ci is GL_EVAL_TRIANGULAR_2D_NV, then n = uorder * (uorder+1)/2. 6935bd8deadSopenharmony_ci The points data is packed such that when unpacked by the server, 6945bd8deadSopenharmony_ci the value of ustride is 16 for GL_FLOAT typed data and 32 for 6955bd8deadSopenharmony_ci GL_DOUBLE typed data. 6965bd8deadSopenharmony_ci 6975bd8deadSopenharmony_ci type encoding of type type of lists m (bytes) 6985bd8deadSopenharmony_ci --------- ---------------- ------------- --------- 6995bd8deadSopenharmony_ci GL_FLOAT 0x1406 LISTofFLOAT32 n*4 7005bd8deadSopenharmony_ci GL_DOUBLE 0x140A LISTofFLOAT64 n*8 7015bd8deadSopenharmony_ci 7025bd8deadSopenharmony_ci If the command is encoded in a glXRenderLarge request, the command 7035bd8deadSopenharmony_ci opcode and command length fields above are expanded to 4 bytes each: 7045bd8deadSopenharmony_ci 7055bd8deadSopenharmony_ci 4 28+m rendering command length 7065bd8deadSopenharmony_ci 4 ???? rendering command opcode 7075bd8deadSopenharmony_ci 7085bd8deadSopenharmony_ci The remaining five commands are non-rendering commands. These commands 7095bd8deadSopenharmony_ci are sent separately (i.e., not as part of a glXRender or glXRenderLarge 7105bd8deadSopenharmony_ci request), using the glXVendorPrivateWithReply request: 7115bd8deadSopenharmony_ci 7125bd8deadSopenharmony_ci GetMapParameterivNV 7135bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 7145bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 7155bd8deadSopenharmony_ci 2 5 request length 7165bd8deadSopenharmony_ci 4 ???? vendor specific opcode 7175bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 7185bd8deadSopenharmony_ci 4 ENUM target 7195bd8deadSopenharmony_ci 4 ENUM pname 7205bd8deadSopenharmony_ci => 7215bd8deadSopenharmony_ci 1 1 reply 7225bd8deadSopenharmony_ci 1 unused 7235bd8deadSopenharmony_ci 2 CARD16 sequence number 7245bd8deadSopenharmony_ci 4 m reply length, m=(n==1?0:n) 7255bd8deadSopenharmony_ci 4 unused 7265bd8deadSopenharmony_ci 4 CARD32 n 7275bd8deadSopenharmony_ci 7285bd8deadSopenharmony_ci if (n=1) this follows: 7295bd8deadSopenharmony_ci 7305bd8deadSopenharmony_ci 4 INT32 params 7315bd8deadSopenharmony_ci 12 unused 7325bd8deadSopenharmony_ci 7335bd8deadSopenharmony_ci otherwise this follows: 7345bd8deadSopenharmony_ci 7355bd8deadSopenharmony_ci 16 unused 7365bd8deadSopenharmony_ci n*4 LISTofINT32 params 7375bd8deadSopenharmony_ci 7385bd8deadSopenharmony_ci GetMapParameterfvNV 7395bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 7405bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 7415bd8deadSopenharmony_ci 2 5 request length 7425bd8deadSopenharmony_ci 4 ???? vendor specific opcode 7435bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 7445bd8deadSopenharmony_ci 4 ENUM target 7455bd8deadSopenharmony_ci 4 ENUM pname 7465bd8deadSopenharmony_ci => 7475bd8deadSopenharmony_ci 1 1 reply 7485bd8deadSopenharmony_ci 1 unused 7495bd8deadSopenharmony_ci 2 CARD16 sequence number 7505bd8deadSopenharmony_ci 4 m reply length, m=(n==1?0:n) 7515bd8deadSopenharmony_ci 4 unused 7525bd8deadSopenharmony_ci 4 CARD32 n 7535bd8deadSopenharmony_ci 7545bd8deadSopenharmony_ci if (n=1) this follows: 7555bd8deadSopenharmony_ci 7565bd8deadSopenharmony_ci 4 FLOAT32 params 7575bd8deadSopenharmony_ci 12 unused 7585bd8deadSopenharmony_ci 7595bd8deadSopenharmony_ci otherwise this follows: 7605bd8deadSopenharmony_ci 7615bd8deadSopenharmony_ci 16 unused 7625bd8deadSopenharmony_ci n*4 LISTofFLOAT32 params 7635bd8deadSopenharmony_ci 7645bd8deadSopenharmony_ci GetMapAttribParameterivNV 7655bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 7665bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 7675bd8deadSopenharmony_ci 2 6 request length 7685bd8deadSopenharmony_ci 4 ???? vendor specific opcode 7695bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 7705bd8deadSopenharmony_ci 4 ENUM target 7715bd8deadSopenharmony_ci 4 CARD32 index 7725bd8deadSopenharmony_ci 4 ENUM pname 7735bd8deadSopenharmony_ci => 7745bd8deadSopenharmony_ci 1 1 reply 7755bd8deadSopenharmony_ci 1 unused 7765bd8deadSopenharmony_ci 2 CARD16 sequence number 7775bd8deadSopenharmony_ci 4 m reply length, m=(n==1?0:n) 7785bd8deadSopenharmony_ci 4 unused 7795bd8deadSopenharmony_ci 4 CARD32 n 7805bd8deadSopenharmony_ci 7815bd8deadSopenharmony_ci if (n=1) this follows: 7825bd8deadSopenharmony_ci 7835bd8deadSopenharmony_ci 4 INT32 params 7845bd8deadSopenharmony_ci 12 unused 7855bd8deadSopenharmony_ci 7865bd8deadSopenharmony_ci otherwise this follows: 7875bd8deadSopenharmony_ci 7885bd8deadSopenharmony_ci 16 unused 7895bd8deadSopenharmony_ci n*4 LISTofINT32 params 7905bd8deadSopenharmony_ci 7915bd8deadSopenharmony_ci GetMapAttribParameterfvNV 7925bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 7935bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 7945bd8deadSopenharmony_ci 2 6 request length 7955bd8deadSopenharmony_ci 4 ???? vendor specific opcode 7965bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 7975bd8deadSopenharmony_ci 4 ENUM target 7985bd8deadSopenharmony_ci 4 CARD32 index 7995bd8deadSopenharmony_ci 4 ENUM pname 8005bd8deadSopenharmony_ci => 8015bd8deadSopenharmony_ci 1 1 reply 8025bd8deadSopenharmony_ci 1 unused 8035bd8deadSopenharmony_ci 2 CARD16 sequence number 8045bd8deadSopenharmony_ci 4 m reply length, m=(n==1?0:n) 8055bd8deadSopenharmony_ci 4 unused 8065bd8deadSopenharmony_ci 4 CARD32 n 8075bd8deadSopenharmony_ci 8085bd8deadSopenharmony_ci if (n=1) this follows: 8095bd8deadSopenharmony_ci 8105bd8deadSopenharmony_ci 4 FLOAT32 params 8115bd8deadSopenharmony_ci 12 unused 8125bd8deadSopenharmony_ci 8135bd8deadSopenharmony_ci otherwise this follows: 8145bd8deadSopenharmony_ci 8155bd8deadSopenharmony_ci 16 unused 8165bd8deadSopenharmony_ci n*4 LISTofFLOAT32 params 8175bd8deadSopenharmony_ci 8185bd8deadSopenharmony_ci GetMapControlPointsNV 8195bd8deadSopenharmony_ci 1 CARD8 opcode (X assigned) 8205bd8deadSopenharmony_ci 1 17 GLX opcode (glXVendorPrivateWithReply) 8215bd8deadSopenharmony_ci 2 6 request length 8225bd8deadSopenharmony_ci 4 ???? vendor specific opcode 8235bd8deadSopenharmony_ci 4 GLX_CONTEXT_TAG context tag 8245bd8deadSopenharmony_ci 4 ENUM target 8255bd8deadSopenharmony_ci 4 CARD32 index 8265bd8deadSopenharmony_ci 4 ENUM type 8275bd8deadSopenharmony_ci => 8285bd8deadSopenharmony_ci 1 1 reply 8295bd8deadSopenharmony_ci 1 unused 8305bd8deadSopenharmony_ci 2 CARD16 sequence number 8315bd8deadSopenharmony_ci 4 m reply length, m 8325bd8deadSopenharmony_ci 4 unused 8335bd8deadSopenharmony_ci 4 CARD32 uorder 8345bd8deadSopenharmony_ci 4 CARD32 vorder 8355bd8deadSopenharmony_ci 12 unused 8365bd8deadSopenharmony_ci 8375bd8deadSopenharmony_ci if type == 0x1406 (GL_FLOAT) and target == 0x86C0 8385bd8deadSopenharmony_ci (GL_EVAL_2D_NV), m = 4*uorder*vorder and the packed control 8395bd8deadSopenharmony_ci points follow assuming ustride = 16 8405bd8deadSopenharmony_ci 8415bd8deadSopenharmony_ci m*4 LISTofFLOAT32 params 8425bd8deadSopenharmony_ci 8435bd8deadSopenharmony_ci if type == 0x140A (GL_DOUBLE) and target == 0x86C0 8445bd8deadSopenharmony_ci (GL_EVAL_2D_NV), m = 4*uorder*vorder and the packed control 8455bd8deadSopenharmony_ci points follow asssuming ustride = 32 8465bd8deadSopenharmony_ci 8475bd8deadSopenharmony_ci m*8 LISTofFLOAT64 params 8485bd8deadSopenharmony_ci 8495bd8deadSopenharmony_ci if type == 0x1406 (GL_FLOAT) and target == 0x86C1 8505bd8deadSopenharmony_ci (GL_EVAL_TRIANGULAR_2D_NV), m = 4*uorder*(uorder+1)/2 and 8515bd8deadSopenharmony_ci the packed control points follow assuming ustride = 16 8525bd8deadSopenharmony_ci 8535bd8deadSopenharmony_ci m*4 LISTofFLOAT32 params 8545bd8deadSopenharmony_ci 8555bd8deadSopenharmony_ci if type == 0x140A (GL_DOUBLE) and target == 0x86C1 8565bd8deadSopenharmony_ci (GL_EVAL_TRIANGULAR_2D_NV), m = 4*uorder*(uorder+1)/2 and 8575bd8deadSopenharmony_ci the packed control points follow asssuming ustride = 32 8585bd8deadSopenharmony_ci 8595bd8deadSopenharmony_ci m*8 LISTofFLOAT64 params 8605bd8deadSopenharmony_ci 8615bd8deadSopenharmony_ci otherwise m = 0 and nothing else follows. 8625bd8deadSopenharmony_ci 8635bd8deadSopenharmony_ciErrors 8645bd8deadSopenharmony_ci 8655bd8deadSopenharmony_ci The error INVALID_VALUE is generated if MapControlPointsNV, 8665bd8deadSopenharmony_ci GetMapControlPointsNV, or GetMapAttribParameter{if}v is called where 8675bd8deadSopenharmony_ci index is greater than 15. 8685bd8deadSopenharmony_ci 8695bd8deadSopenharmony_ci The error INVALID_VALUE is generated if MapControlPointsNV 8705bd8deadSopenharmony_ci or GetMapControlPointsNV is called where ustride or vstride is 8715bd8deadSopenharmony_ci negative. 8725bd8deadSopenharmony_ci 8735bd8deadSopenharmony_ci The error INVALID_VALUE is generated if MapControlPointsNV is 8745bd8deadSopenharmony_ci called where uorder or vorder is less than one or greater than 8755bd8deadSopenharmony_ci MAX_EVAL_ORDER. 8765bd8deadSopenharmony_ci 8775bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if MapControlPointsNV is 8785bd8deadSopenharmony_ci called where target is EVAL_TRIANGULAR_2D_NV and uorder is not equal 8795bd8deadSopenharmony_ci to vorder. 8805bd8deadSopenharmony_ci 8815bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if MapControlPointsNV is 8825bd8deadSopenharmony_ci called where index is 0, one of the control points' fourth 8835bd8deadSopenharmony_ci components is not equal to 1, and either uorder of vorder is greater 8845bd8deadSopenharmony_ci than MAX_RATIONAL_EVAL_ORDER_NV. 8855bd8deadSopenharmony_ci 8865bd8deadSopenharmony_ci The error INVALID_OPERATION is generated if EvalMapsNV is called 8875bd8deadSopenharmony_ci where EVAL_VERTEX_ATTRIB0_NV is disabled. 8885bd8deadSopenharmony_ci 8895bd8deadSopenharmony_ciNew State 8905bd8deadSopenharmony_ci 8915bd8deadSopenharmony_ci(add to table 6.22, page 212) 8925bd8deadSopenharmony_ci 8935bd8deadSopenharmony_ciGet Value Type Get Command Initial Value Description Sec Attribute 8945bd8deadSopenharmony_ci------------------------------- ----------- ------------------------ ---------------- -------------- ----- --------- 8955bd8deadSopenharmony_ciEVAL_FRACTIONAL_TESSELLATION_NV B IsEnabled False fractional 5.7 eval/enable 8965bd8deadSopenharmony_ci tess. enable 8975bd8deadSopenharmony_ciEVAL_VERTEX_ATTRIBi_NV Bx16 IsEnabled True if i=0, attrib eval 5.7 eval/enable 8985bd8deadSopenharmony_ci false otherwise enable 8995bd8deadSopenharmony_ci 9005bd8deadSopenharmony_ciEVAL_2D_NV R4x16x8*x8* GetMapControlPointsNV [0,0,0,1] control points 5.7 - 9015bd8deadSopenharmony_ciEVAL_TRIANGULAR_2D_NV R4x16x8*x8* GetMapControlPoints [0,0,0,1] control points 5.7 - 9025bd8deadSopenharmony_ci 9035bd8deadSopenharmony_ciMAP_TESSELLATION_NV R4,R3 GetMapParameter*NV all 1.0 level of 5.7 eval 9045bd8deadSopenharmony_ci tessellation 9055bd8deadSopenharmony_ci 9065bd8deadSopenharmony_ciMAP_ATTRIB_U_ORDER_NV Z8*x16x2 GetMapAttribParameter*NV 1 map order in 5.7 - 9075bd8deadSopenharmony_ci U direction 9085bd8deadSopenharmony_ciMAP_ATTRIB_V_ORDER_NV Z8*x16x2 GetMapAttribParameter*NV 1 map order in 5.7 - 9095bd8deadSopenharmony_ci V direction 9105bd8deadSopenharmony_ciNew Implementation Dependent State 9115bd8deadSopenharmony_ci 9125bd8deadSopenharmony_ci(add to table 6.24/6.25, page 214) 9135bd8deadSopenharmony_ci 9145bd8deadSopenharmony_ciGet Value Type Get Command Minimum Value Description Sec Attribute 9155bd8deadSopenharmony_ci------------------------ ---- ------------ ------------- ----------- ----- --------- 9165bd8deadSopenharmony_ciMAX_MAP_TESSELLATION_NV Z+ GetIntegerv 256 maximum level 5.7 - 9175bd8deadSopenharmony_ci of tessellation 9185bd8deadSopenharmony_ciMAX_RATIONAL_EVAL_ORDER_NV Z+ GetIntegerv 4 maximum order 5.7 - 9195bd8deadSopenharmony_ci of rational 9205bd8deadSopenharmony_ci surfaces 9215bd8deadSopenharmony_ci 9225bd8deadSopenharmony_ciRevision History 9235bd8deadSopenharmony_ci 9245bd8deadSopenharmony_ci 1/3/2003 changed status to "discontinued" 925