15bd8deadSopenharmony_ci 25bd8deadSopenharmony_ciName 35bd8deadSopenharmony_ci 45bd8deadSopenharmony_ci EXT_multi_draw_arrays 55bd8deadSopenharmony_ci SUN_multi_draw_arrays 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ciName Strings 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ci GL_EXT_multi_draw_arrays 105bd8deadSopenharmony_ci GL_SUN_multi_draw_arrays 115bd8deadSopenharmony_ci 125bd8deadSopenharmony_ci (Note: this extension has been promoted from SUN to EXT status. 135bd8deadSopenharmony_ci Implementations should advertise both name strings, and both EXT 145bd8deadSopenharmony_ci and SUN versions of the new GL functions should be provided). 155bd8deadSopenharmony_ci 165bd8deadSopenharmony_ciContact 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ci Ron Bielaski, Sun (Ron.Bielaski 'at' eng.sun.com) 195bd8deadSopenharmony_ci Jack Middleton, Sun (Jack.Middleton 'at' eng.sun.com) 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciStatus 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci Shipping 245bd8deadSopenharmony_ci 255bd8deadSopenharmony_ciVersion 265bd8deadSopenharmony_ci 275bd8deadSopenharmony_ci Version 4, June 18, 2013 285bd8deadSopenharmony_ci 295bd8deadSopenharmony_ciNumber 305bd8deadSopenharmony_ci 315bd8deadSopenharmony_ci 148 325bd8deadSopenharmony_ci OpenGL ES Extension #69 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ciDependencies 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ci OpenGL 1.1 is required. The language is written against the OpenGL 1.2 375bd8deadSopenharmony_ci specification. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ciOverview 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci These functions behave identically to the standard OpenGL 1.1 functions 425bd8deadSopenharmony_ci glDrawArrays() and glDrawElements() except they handle multiple lists of 435bd8deadSopenharmony_ci vertices in one call. Their main purpose is to allow one function call 445bd8deadSopenharmony_ci to render more than one primitive such as triangle strip, triangle fan, 455bd8deadSopenharmony_ci etc. 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ciNew Procedures and Functions 485bd8deadSopenharmony_ci 495bd8deadSopenharmony_ci void glMultiDrawArraysEXT( GLenum mode, 505bd8deadSopenharmony_ci const GLint *first, 515bd8deadSopenharmony_ci const GLsizei *count, 525bd8deadSopenharmony_ci GLsizei primcount) 535bd8deadSopenharmony_ci Parameters 545bd8deadSopenharmony_ci ---------- 555bd8deadSopenharmony_ci mode Specifies what kind of primitives to 565bd8deadSopenharmony_ci render. Symbolic constants GL_POINTS, 575bd8deadSopenharmony_ci GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, 585bd8deadSopenharmony_ci GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, 595bd8deadSopenharmony_ci GL_TRIANGLES, GL_QUAD_STRIP, GL_QUADS, 605bd8deadSopenharmony_ci and GL_POLYGON are accepted. 615bd8deadSopenharmony_ci 625bd8deadSopenharmony_ci first Points to an array of starting indices in 635bd8deadSopenharmony_ci the enabled arrays. 645bd8deadSopenharmony_ci 655bd8deadSopenharmony_ci count Points to an array of the number of indices 665bd8deadSopenharmony_ci to be rendered. 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci primcount Specifies the size of first and count 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci void glMultiDrawElementsEXT( GLenum mode, 725bd8deadSopenharmony_ci GLsizei *count, 735bd8deadSopenharmony_ci GLenum type, 745bd8deadSopenharmony_ci const void * const *indices, 755bd8deadSopenharmony_ci GLsizei primcount) 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci Parameters 785bd8deadSopenharmony_ci ---------- 795bd8deadSopenharmony_ci mode Specifies what kind of primitives to render. 805bd8deadSopenharmony_ci Symbolic constants GL_POINTS, GL_LINE_STRIP, 815bd8deadSopenharmony_ci GL_LINE_LOOP, GL_LINES, GL_TRIANGLE_STRIP, 825bd8deadSopenharmony_ci GL_TRIANGLE_FAN, GL_TRIANGLES, GL_QUAD_STRIP, 835bd8deadSopenharmony_ci GL_QUADS, and GL_POLYGON are accepted. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci count Points to and array of the element counts 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci type Specifies the type of the values in indices. 885bd8deadSopenharmony_ci Must be one of GL_UNSIGNED_BYTE, 895bd8deadSopenharmony_ci GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT. 905bd8deadSopenharmony_ci 915bd8deadSopenharmony_ci indices Specifies a pointer to the location where 925bd8deadSopenharmony_ci the indices are stored. 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci primcount Specifies the size of the count array 955bd8deadSopenharmony_ci 965bd8deadSopenharmony_ciNew Tokens 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci None 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.2 Specification (OpenGL Operation) 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci Section 2.8 Vertex Arrays: 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci The command 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci void glMultiDrawArraysEXT( GLenum mode, 1075bd8deadSopenharmony_ci const GLint* first, 1085bd8deadSopenharmony_ci const GLsizei *count, 1095bd8deadSopenharmony_ci GLsizei primcount) 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci Behaves identically to DrawArrays except that a list of arrays is 1125bd8deadSopenharmony_ci specified instead. The number of lists is specified in the primcount 1135bd8deadSopenharmony_ci parameter. It has the same effect as: 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci for(i=0; i<primcount; i++) { 1165bd8deadSopenharmony_ci if (*(count+i)>0) DrawArrays(mode, *(first+i), *(count+i)); 1175bd8deadSopenharmony_ci } 1185bd8deadSopenharmony_ci 1195bd8deadSopenharmony_ci The command 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci void glMultiDrawElementsEXT( GLenum mode, 1225bd8deadSopenharmony_ci GLsizei *count, 1235bd8deadSopenharmony_ci GLenum type, 1245bd8deadSopenharmony_ci const void **indices, 1255bd8deadSopenharmony_ci GLsizei primcount) 1265bd8deadSopenharmony_ci 1275bd8deadSopenharmony_ci Behaves identically to DrawElements except that a list of arrays is 1285bd8deadSopenharmony_ci specified instead. The number of lists is specified in the primcount 1295bd8deadSopenharmony_ci parameter. It has the same effect as: 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci for(i=0; i<primcount; i++) { 1325bd8deadSopenharmony_ci if (*(count+i)>0) DrawElements(mode, *(count+i), type, 1335bd8deadSopenharmony_ci *(indices+i)); 1345bd8deadSopenharmony_ci } 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.2 Specification (Rasterization) 1375bd8deadSopenharmony_ci 1385bd8deadSopenharmony_ci None 1395bd8deadSopenharmony_ci 1405bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.2 Specification (Per-Fragment Operations and 1415bd8deadSopenharmony_ci 1425bd8deadSopenharmony_ci None 1435bd8deadSopenharmony_ci 1445bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.2 Specification (Special Functions) 1455bd8deadSopenharmony_ci 1465bd8deadSopenharmony_ci None 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.2 Specification (State and State Requests) 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci None 1515bd8deadSopenharmony_ci 1525bd8deadSopenharmony_ciAdditions to the GLX / WGL / AGL Specifications 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci None 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ciGLX Protocol 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ci None 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ciErrors 1615bd8deadSopenharmony_ci 1625bd8deadSopenharmony_ci GL_INVALID_ENUM is generated if <mode> is not an accepted value. 1635bd8deadSopenharmony_ci 1645bd8deadSopenharmony_ci GL_VALUE is generated if <primcount> is negative. 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci GL_INVALID_OPERATION is generated if glMultiDrawArraysEXT or 1675bd8deadSopenharmony_ci glMultiDrawElementsEXT is executed between the execution of glBegin 1685bd8deadSopenharmony_ci and the corresponding glEnd. 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ciNew State 1715bd8deadSopenharmony_ci 1725bd8deadSopenharmony_ci None 1735bd8deadSopenharmony_ci 1745bd8deadSopenharmony_ciOpenGL ES interactions 1755bd8deadSopenharmony_ci This extension can also be implemented against OpenGL ES 1.x or 1765bd8deadSopenharmony_ci OpenGL ES 2.0. In those cases, remove references to glBegin, glEnd, 1775bd8deadSopenharmony_ci and to GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON. 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci 1805bd8deadSopenharmony_ciRevision History 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci Version 5, 2013/09/08 (Jon Leech) - Changed GLvoid -> void 1835bd8deadSopenharmony_ci (Bug 10412). 1845bd8deadSopenharmony_ci Version 4, 2013/06/18 (Jon Leech) - Added 'const' to 1855bd8deadSopenharmony_ci MultiDrawElementsEXT, too, based on feedback from Mesa. 1865bd8deadSopenharmony_ci Version 3, 2010/08/06 - Added 'const' to MultiDrawArraysEXT pointer 1875bd8deadSopenharmony_ci arguments to match the core GL entry point. 1885bd8deadSopenharmony_ci 30/09/09 - Added fields from the new extension template and 1895bd8deadSopenharmony_ci interactions with OpenGL ES. 1905bd8deadSopenharmony_ci 6/24/99 - Added fields from the new extension template. 191