15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci ARB_transform_feedback_instanced 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_ARB_transform_feedback_instanced 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Graham Sellers, AMD (graham.sellers 'at' amd.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciContributors 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci XXX 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciNotice 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci Copyright (c) 2011-2013 The Khronos Group Inc. Copyright terms at 205bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 215bd8deadSopenharmony_ci 225bd8deadSopenharmony_ciSpecification Update Policy 235bd8deadSopenharmony_ci 245bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 255bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL Working Group. For 265bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 275bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 285bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 295bd8deadSopenharmony_ci described in more detail at 305bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciStatus 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Complete. Approved by the ARB on 2011/06/20. 355bd8deadSopenharmony_ci Approved by the Khronos Promoters on 2011/07/29. 365bd8deadSopenharmony_ci 375bd8deadSopenharmony_ciVersion 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci Last Modified Date: December 15th, 2010 405bd8deadSopenharmony_ci Revision: 2 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ciNumber 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ci ARB Extension #109 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ciDependencies 475bd8deadSopenharmony_ci 485bd8deadSopenharmony_ci OpenGL 4.0 or the ARB_transform_feedback2 extension is required. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci OpenGL 3.1 or the ARB_draw_instanced extension is required. 515bd8deadSopenharmony_ci 525bd8deadSopenharmony_ci This extension interacts with the ARB_transform_feedback3 extension. 535bd8deadSopenharmony_ci 545bd8deadSopenharmony_ci This extension is written against the OpenGL 4.1 (Core Profile) specification. 555bd8deadSopenharmony_ci 565bd8deadSopenharmony_ciOverview 575bd8deadSopenharmony_ci 585bd8deadSopenharmony_ci Multiple instances of geometry may be specified to the GL by calling 595bd8deadSopenharmony_ci functions such as DrawArraysInstanced and DrawElementsInstanced. Further, 605bd8deadSopenharmony_ci the results of a transform feedback operation may be returned to the GL 615bd8deadSopenharmony_ci by calling DrawTransformFeedback, or DrawTransformFeedbackStream. However, 625bd8deadSopenharmony_ci it is not presently possible to draw multiple instances of data 635bd8deadSopenharmony_ci transform feedback without using a query and the resulting round trip from 645bd8deadSopenharmony_ci server to client. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci This extension adds functionality to draw multiple instances of the result 675bd8deadSopenharmony_ci of a transform feedback operation. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ciNew Procedures and Functions 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci void DrawTransformFeedbackInstanced(enum mode, uint id, sizei primcount); 725bd8deadSopenharmony_ci void DrawTransformFeedbackStreamInstanced(enum mode, uint id, uint stream, sizei primcount); 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ciNew Tokens 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ci None. 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL 4.1 (Core Profile) Specification 795bd8deadSopenharmony_ci(OpenGL Operation) 805bd8deadSopenharmony_ci 815bd8deadSopenharmony_ciModify Section 2.17.3, "Transform Feedback Draw Operations" 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci ... The number of vertices captured from each vertex stream during transform 845bd8deadSopenharmony_ci feedback is stored in the corresponding transform feedback object and may 855bd8deadSopenharmony_ci be used in conjunction with the commands 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci void DrawTransformFeedback(enum mode, uint id); 885bd8deadSopenharmony_ci void DrawTransformFeedbackInstanced(enum mode, uint id, sizei primcount); 895bd8deadSopenharmony_ci void DrawTransformFeedbackStream(enum mode, uint id, uint stream); 905bd8deadSopenharmony_ci void DrawTransformFeedbackStreamInstanced(enum mode, uint id, uint stream, sizei primcount); 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci to replay the captured vertices. 935bd8deadSopenharmony_ci 945bd8deadSopenharmony_ci DrawTransformFeedbackStreamInstanced is equivalent to calling 955bd8deadSopenharmony_ci DrawArraysInstanced with <mode> as specified, <first> set to zero, <count> 965bd8deadSopenharmony_ci set to the number of vertices captured from the vertex stream numbered 975bd8deadSopenharmony_ci <stream> the last time transform was active on the transform feedback 985bd8deadSopenharmony_ci object named <id>, and <primcount> as specified. The error INVALID_VALUE 995bd8deadSopenharmony_ci is generated if <stream> is greater than or equal to the value of 1005bd8deadSopenharmony_ci MAX_VERTEX_STREAMS. Calling DrawTransformFeedbackInstanced is equivalent 1015bd8deadSopenharmony_ci to calling DrawTransformFeedbackStreamInstanced with <stream> set to zero. 1025bd8deadSopenharmony_ci Calling DrawTransformFeedbackStream is equivalent to calling 1035bd8deadSopenharmony_ci DrawTransformFeedbackStreamInstanced with <primcount> set to one. Finally, 1045bd8deadSopenharmony_ci calling DrawTransformFeedback is equivalent to calling 1055bd8deadSopenharmony_ci DrawTransformFeedbackStreamInstanced with <stream> set to zero and 1065bd8deadSopenharmony_ci <primcount> set to one. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciAdditions to Chapter 3 of the OpenGL 4.1 (Core Profile) Specification 1095bd8deadSopenharmony_ci(Rasterization) 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci None. 1125bd8deadSopenharmony_ci 1135bd8deadSopenharmony_ciAdditions to Chapter 4 of the OpenGL 4.1 (Core Profile) Specification 1145bd8deadSopenharmony_ci(Per-Fragment Operations and the Framebuffer) 1155bd8deadSopenharmony_ci 1165bd8deadSopenharmony_ci None. 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ciAdditions to Chapter 5 of the OpenGL 4.1 (Core Profile) Specification 1195bd8deadSopenharmony_ci(Special Functions) 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci None. 1225bd8deadSopenharmony_ci 1235bd8deadSopenharmony_ciAdditions to Chapter 6 of the OpenGL 4.1 (Core Profile) Specification 1245bd8deadSopenharmony_ci(State and State Requests) 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci None. 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ciErrors 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci INVALID_ENUM is generated by DrawTransformFeedbackStreamInstanced if <mode> 1315bd8deadSopenharmony_ci is not an accepted value. 1325bd8deadSopenharmony_ci 1335bd8deadSopenharmony_ci INVALID_VALUE is generated by DrawTransformFeedbackStreamInstanced if 1345bd8deadSopenharmony_ci <stream> is greater than or equal to the value of MAX_VERTEX_STREAMS. 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci INVALID_VALUE is generated by DrawTransformFeedbackStreamInstanced if 1375bd8deadSopenharmony_ci <id> is not the name of a transform feedback object. 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci INVALID_OPERATION is generated by DrawTransformFeedbackStreamInstanced if a 1405bd8deadSopenharmony_ci non-zero buffer object name is bound to an enabled array and the buffer 1415bd8deadSopenharmony_ci object's data store is currently mapped. 1425bd8deadSopenharmony_ci 1435bd8deadSopenharmony_ci INVALID_OPERATION is generated by DrawTransformFeedbackStreamInstanced if a 1445bd8deadSopenharmony_ci geometry shader is active and mode is incompatible with the input primitive 1455bd8deadSopenharmony_ci type of the geometry shader in the currently installed program object. 1465bd8deadSopenharmony_ci 1475bd8deadSopenharmony_ci INVALID_OPERATION is generated if by DrawTransformFeedbackStreamInstanced if 1485bd8deadSopenharmony_ci mode is PATCHES and no tessellation control shader is active. 1495bd8deadSopenharmony_ci 1505bd8deadSopenharmony_ci INVALID_OPERATION is generated if by DrawTransformFeedbackStreamInstanced if 1515bd8deadSopenharmony_ci glEndTransformFeedback has never been called while the transform feedback 1525bd8deadSopenharmony_ci object named by id was bound. 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci Other errors generated by DrawElements, DrawArrays or other drawing commands 1555bd8deadSopenharmony_ci (for example, due to framebuffer incompleteness) may be generated by 1565bd8deadSopenharmony_ci DrawTransformFeedbackStreamInstanced. 1575bd8deadSopenharmony_ci 1585bd8deadSopenharmony_ciDependencies on OpenGL 4.0 and GL_ARB_transform_feedback3 1595bd8deadSopenharmony_ci 1605bd8deadSopenharmony_ci If the GL version is less than 4.0, and if GL_ARB_transform_feedback3 is 1615bd8deadSopenharmony_ci not supported, this extension only adds DrawTransformFeedbackInstanced 1625bd8deadSopenharmony_ci (not DrawTransformFeedbackStreamInstanced). In that case, remove all 1635bd8deadSopenharmony_ci references to DrawTransformFeedbackStreamInstanced and instead define 1645bd8deadSopenharmony_ci DrawTransformFeedback in terms of DrawTransformFeedbackInstanced. 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ciIssues 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci 1) Do I need OpenGL 3.1, OpenGL 4.0 or ARB_transform_feedback3? 1695bd8deadSopenharmony_ci 1705bd8deadSopenharmony_ci If you have ARB_draw_transform_feedback3 or OpenGL 4.0, you're good to go. 1715bd8deadSopenharmony_ci You need at least OpenGL 3.1 _with_ ARB_transform_feedback3. 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci 2) Do we need a DrawTransformFeedbackStreamInstancedBaseInstance when both 1745bd8deadSopenharmony_ci this extension and ARB_base_instance are present? 1755bd8deadSopenharmony_ci 1765bd8deadSopenharmony_ci Perhaps. That's a bit wordy. Not adding it for now. How about in 1775bd8deadSopenharmony_ci ARB_transform_feedback_instanced2? 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ciRevision History 1805bd8deadSopenharmony_ci 1815bd8deadSopenharmony_ci Rev. Date Author Changes 1825bd8deadSopenharmony_ci ---- -------- -------- ----------------------------------------- 1835bd8deadSopenharmony_ci 2 12/15/10 gsellers Address comments from bmerry (bug 6961) 1845bd8deadSopenharmony_ci 1 09/23/10 gsellers Initial revision 185