1Name 2 3 ARB_conditional_render_inverted 4 5Name Strings 6 7 GL_ARB_conditional_render_inverted 8 9Contact 10 11 Brian Paul, VMware Inc. (brianp 'at' vmware.com) 12 13Contributors 14 15 Brian Paul, VMware 16 Daniel Rakos, AMD 17 18Notice 19 20 Copyright (c) 2014 The Khronos Group Inc. Copyright terms at 21 http://www.khronos.org/registry/speccopyright.html 22 23Specification Update Policy 24 25 Khronos-approved extension specifications are updated in response to 26 issues and bugs prioritized by the Khronos OpenGL Working Group. For 27 extensions which have been promoted to a core Specification, fixes will 28 first appear in the latest version of that core Specification, and will 29 eventually be backported to the extension document. This policy is 30 described in more detail at 31 https://www.khronos.org/registry/OpenGL/docs/update_policy.php 32 33Status 34 35 Complete. 36 Approved by the ARB on June 26, 2014. 37 Ratified by the Khronos Board of Promoters on August 7, 2014. 38 39Version 40 41 Date: June 9, 2014 42 Revision: 5 43 44Number 45 46 ARB Extension #161 47 48Dependencies 49 50 OpenGL 3.0 is required. 51 52 The extension is written against the OpenGL 4.4 Specification, Core 53 Profile, March 19, 2014. 54 55Overview 56 57 This extension adds new modes to BeginConditionalRender which invert 58 the condition used to determine whether to draw or not. 59 60IP Status 61 62 No known IP claims. 63 64New Procedures and Functions 65 66 None. 67 68New Tokens 69 70 Accepted by the <mode> parameter of BeginConditionalRender: 71 72 QUERY_WAIT_INVERTED 0x8E17 73 QUERY_NO_WAIT_INVERTED 0x8E18 74 QUERY_BY_REGION_WAIT_INVERTED 0x8E19 75 QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A 76 77Additions to Chapter 10 of the OpenGL 4.4 (Core Profile) Specification (Vertex Specification and Drawing Commands) 78 79 Modify Section 10.10, Conditional Rendering 80 81 (add before the errors section for BeginConditionalRender on p. 339) 82 83 If <mode> is QUERY_WAIT_INVERTED, QUERY_NO_WAIT_INVERTED, 84 QUERY_BY_REGION_WAIT_INVERTED, or QUERY_BY_REGION_NO_WAIT_INVERTED 85 then the condition used to determine whether or not to render subsequent 86 drawing commands is negated with respect to QUERY_WAIT, QUERY_NO_WAIT, 87 QUERY_BY_REGION_WAIT, or QUERY_BY_REGION_NO_WAIT, respectively. If <mode> 88 is QUERY_NO_WAIT_INVERTED or QUERY_BY_REGION_NO_WAIT_INVERTED 89 the GL may choose to unconditionally execute the subsequent rendering 90 commands without waiting for the query to complete. 91 92Additions to the AGL/EGL/GLX/WGL Specifications 93 94 None. 95 96Dependencies 97 98 None. 99 100New State 101 102 None. 103 104New Implementation Dependent State 105 106 None. 107 108Issues 109 110 (1) Why is this extension necessary? 111 112 RESOLVED: A competing graphics API supports this feature. This 113 extension will allow one to easier implement that API's features 114 on top of OpenGL. Also, with the GL_ARB_transform_feedback_overflow_query 115 extension, it's not obvious whether conditional rendering should 116 discard drawing if a transform feedback buffer overflow occurs or 117 doesn't occur. This extension allows both possibilities. 118 119 (2) Should there be QUERY_NO_WAIT_INVERTED and 120 QUERY_BY_REGION_NO_WAIT_INVERTED queries? 121 122 RESOLVED: Yes. Suppose we issue a SAMPLES_PASSED query and begin 123 conditional rendering with QUERY_NO_WAIT_INVERTED. If the query 124 it not ready yet, the GL might render the subsequent primitives even 125 if they might have been visible. There may be a non-obvious use for 126 this. 127 128 (3) What gets inverted, the condition or the behavior? 129 130 DISCUSSION: For QUERY_WAIT_INVERTED and QUERY_BY_REGION_WAIT_INVERTED 131 it doesn't really matter, but for the other two modes there are two 132 possibilities: 133 134 (a) Inverted condition, in which case the GL renders subsequent 135 primitives if the query is not complete yet. 136 137 (b) Inverted behavior, in which case the GL discards subsequent 138 primitives if the query is not complete yet. 139 140 RESOLVED: We chose option (a). The condition is inverted. 141 142Revision History 143 144 Revision 5, 2014/06/09 (Jon Leech) 145 - Assign enums per bug 12362 146 147 Revision 4, 2014/04/25 (Daniel Rakos) 148 - Renamed to ARB_conditional_render_inverted. 149 - Removed suffixes. 150 - Resolved isues (2) and (3). 151 152 Revision 3, 2014/04/16 (Daniel Rakos) 153 - Renamed extension to EXT_conditional_render_inverted. 154 - Marked issue (2) unresolved, changed the behavior for incomplete 155 queries, and added issue (3). 156 - Clarified language regarding what gets inverted and how issue (2) 157 affects the behavior. 158 159 Revision 2, 2014/04/10 (Brian Paul) 160 - Added issue (2) to justify QUERY_NO_WAIT_INVERTED_EXT. 161 162 Revision 1, 2014/02/03 (Brian Paul) 163 - Initial revision. 164