15bd8deadSopenharmony_ciXXX - Not complete yet!!! 25bd8deadSopenharmony_ciName 35bd8deadSopenharmony_ci 45bd8deadSopenharmony_ci SGIX_quad_mesh 55bd8deadSopenharmony_ci 65bd8deadSopenharmony_ciName Strings 75bd8deadSopenharmony_ci 85bd8deadSopenharmony_ci GL_SGIX_quad_mesh 95bd8deadSopenharmony_ci 105bd8deadSopenharmony_ciVersion 115bd8deadSopenharmony_ci 125bd8deadSopenharmony_ci $Date: 1997/02/21 17:32:24 $ $Revision: 1.2 $ 135bd8deadSopenharmony_ci 145bd8deadSopenharmony_ciNumber 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ci XXX 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciDependencies 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci No extensions are required. 215bd8deadSopenharmony_ci OpenGL 1.1 and EXT_vertex_array affect the definition of this extension. 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ciOverview 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ci This extension adds two primitive types, the quadrilateral mesh and the 265bd8deadSopenharmony_ci line mesh. 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ci For datasets representing from manifold surfaces, such as NURBS surfaces 295bd8deadSopenharmony_ci and most triangular databases, quadrilateral meshes reduce the number of 305bd8deadSopenharmony_ci vertices which must be transferred from the host to the graphics hardware 315bd8deadSopenharmony_ci by up to fifty percent. This also reduces by fifty percent the number of 325bd8deadSopenharmony_ci vertices which must be clipped and lit. 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Quad and line meshes also reduce by half the number of vertices which must 355bd8deadSopenharmony_ci be transformed and lit. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciIssues 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci * Kurt: The issue in the past has been the required intermediate storage. 405bd8deadSopenharmony_ci Your spec seems to require that implementations be able to store at least 415bd8deadSopenharmony_ci 512 vertexes. I wonder how you arrived at this number. 425bd8deadSopenharmony_ci 435bd8deadSopenharmony_ci Matt: I chose this number primary because it is large enough that 445bd8deadSopenharmony_ci applications are unlikely to have quad-mesh datasets larger than this 455bd8deadSopenharmony_ci size. I wanted to avoid forcing applications to carve up their quad mesh 465bd8deadSopenharmony_ci data in hardware-specific ways, and instead allow the implementation to 475bd8deadSopenharmony_ci make the decision about optimal mesh width. 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci I was also careful to minimize the amount of state. Note that a naive 505bd8deadSopenharmony_ci implementation that just wants to draw the quad mesh as a bunch of 515bd8deadSopenharmony_ci independent quads only needs to amount of state listed in the spec. 525bd8deadSopenharmony_ci Every time glVertex is then called, one new quad is drawn. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci * Kurt: Is it implementable on all current SGI platforms? 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ci Matt: If it is implemented as drawing independent quads, then yes. On 575bd8deadSopenharmony_ci platforms where you really want to take advantage of the fact that you can 585bd8deadSopenharmony_ci light and xform the shared vertices only once, you may need to carve up 595bd8deadSopenharmony_ci the quad mesh into smaller pieces on the host (or ge). to do that, you 605bd8deadSopenharmony_ci will need more implementation-private state. 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ciNew Procedures and Functions 635bd8deadSopenharmony_ci 645bd8deadSopenharmony_ci void MeshBreadthSGIX(int breadth); 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci void MeshStrideSGIX(int stride); 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ciNew Tokens 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci Accepted by the <mode> parameter of Begin, and 715bd8deadSopenharmony_ci also accepted by the <mode> parameter of DrawArrays: 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ci QUAD_MESH_SGIX 0x???? 745bd8deadSopenharmony_ci LINE_MESH_SGIX 0x???? 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci Append to section 2.6.1 (Begin and End Objects): 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Quad meshes and line meshes use an auxilliary function, MeshBreadthSGIX to 815bd8deadSopenharmony_ci define GL state which affects the quads and lines drawn by these 825bd8deadSopenharmony_ci primitives. The <breadth> parameter to MeshBreadthSGIX is used in the 835bd8deadSopenharmony_ci descriptions of quad meshes and line meshes below. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci Quadrilateral (quad) meshes: 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci Quad meshes efficiently generate a series of quads in a regular grid. 885bd8deadSopenharmony_ci Given n input vertices to the quad mesh, the last n mod <breadth> vertices 895bd8deadSopenharmony_ci are ignored completely. Let length = (n - (n mod <breadth>)) / <breadth>, 905bd8deadSopenharmony_ci and consider all j = 0,1,2,<breadth>*length-1. A quad is drawn for four 915bd8deadSopenharmony_ci vertices v_j-<breadth>-1, v_j-<breadth>, v_j, v_j-1 for all j such that j 925bd8deadSopenharmony_ci mod <breadth> != 0 and j >= <breadth>. The order in which the quads 935bd8deadSopenharmony_ci within a quad mesh are drawn is intentionally left completely undefined. 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ci Line meshes: 965bd8deadSopenharmony_ci 975bd8deadSopenharmony_ci Line meshes efficiently generate a series of lines in a regular grid. 985bd8deadSopenharmony_ci Given n input vertices to the line mesh, the last n mod <breadth> vertices 995bd8deadSopenharmony_ci are ignored completely. Let length = (n - (n mod <breadth>)) / <breadth>, 1005bd8deadSopenharmony_ci and consider all j = 0,1,2,<breadth>*length-1. A line is drawn between 1015bd8deadSopenharmony_ci vertex v_j-1 and v_j for all j such that j mod <breadth> != 0. A line is 1025bd8deadSopenharmony_ci drawn between vertex v_j-<breadth> and v_j for all j such that j >= 1035bd8deadSopenharmony_ci <breadth>. The order in which the lines within a line mesh are drawn is 1045bd8deadSopenharmony_ci intentionally left completely undefined. 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci Append to section 2.8 (Vertex Arrays) entry for DrawArrays: 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci The order in which the quads or lines within a quad mesh or line mesh are 1095bd8deadSopenharmony_ci drawn is intentionally left completely undefined. They may be rendered in 1105bd8deadSopenharmony_ci any order convenient for the implementation. 1115bd8deadSopenharmony_ci 1125bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.0 Specification (Rasterization) 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci None 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 1175bd8deadSopenharmony_ciand the Frame Buffer) 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci None 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ci None 1245bd8deadSopenharmony_ci 1255bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci None 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ciAdditions to the GLX Specification 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci None 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ciGLX Protocol 1345bd8deadSopenharmony_ci 1355bd8deadSopenharmony_ci XXX - Not figured out yet. 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ciDependencies on OpenGL 1.1 1385bd8deadSopenharmony_ciDependencies on EXT_vertex_array 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ci If neither OpenGL 1.1 nor EXT_vertex_array are present, then the following 1415bd8deadSopenharmony_ci should be omited: 1425bd8deadSopenharmony_ci all references to MeshStrideSGIX, 1435bd8deadSopenharmony_ci all references to DrawArrays. 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ciErrors 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci INVALID_VALUE is generated if MeshBreadthSGIX parameter <breadth> is 1485bd8deadSopenharmony_ci zero or negative. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci INVALID_OPERATION is generated if MeshBreadthSGIX is executed between the 1515bd8deadSopenharmony_ci execution of Begin and the corresponding execution of End. 1525bd8deadSopenharmony_ci 1535bd8deadSopenharmony_ciNew State 1545bd8deadSopenharmony_ci 1555bd8deadSopenharmony_ci Replace beginning of table 6.4: GL Internal begin-end state variables (inaccessible) 1565bd8deadSopenharmony_ci 1575bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib Description 1585bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ ----------- 1595bd8deadSopenharmony_ci Z_13 0 When != 0, indicates begin/end object 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci Append to table 6.4: GL Internal begin-end state variables (inaccessible) 1625bd8deadSopenharmony_ci 1635bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib Description 1645bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ ----------- 1655bd8deadSopenharmony_ci 513*XV MAX_MESH_BREADTH + 1 vertices. 1665bd8deadSopenharmony_ci First entries are from current row. 1675bd8deadSopenharmony_ci Last entries are from previous row. 1685bd8deadSopenharmony_ci Z512* 0 Number of vertices accumulated for 1695bd8deadSopenharmony_ci current row of mesh in the array above. 1705bd8deadSopenharmony_ci B 0 True if not in first row of quad mesh. 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci Append to table 6.5: Current Values and Associated Data 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib Description 1755bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ ----------- 1765bd8deadSopenharmony_ci MESH_BREADTH glGetIntegerv Z+ 2 current Breadth of quad and line meshes 1775bd8deadSopenharmony_ci 1785bd8deadSopenharmony_ciNew Implementation Dependent State 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ci Get Value Get Command Type Value Attrib 1815bd8deadSopenharmony_ci --------- ----------- ---- ------- ------ 1825bd8deadSopenharmony_ci MAX_MESH_BREADTH glGetIntegerv Z+ 512* 183