Name MESA_clip_disable Name Strings GL_MESA_clip_disable Contact Stefan Dösinger (stefan 'at' codeweavers.com) Status Draft TODO: Token values TODO: Formal language defining interaction with gl_FragCoord TODO: Implementation dependent state TODO: Number Version Version 1, 2012/12/9 Number ??? Dependencies Written based on the wording of the OpenGL 3.1 specification. Some wording taken from ARB_depth_clamp. ARB_depth_clamp must not be supported. Overview This extension exposes the ability to disable the near and far clipping planes in a way simmilar to ARB_depth_clamp without specifying clamping behavior. It is intended to be used with orthogonal transformation matrices and the depth test disabled. If ARB_depth_clamp is supported by the driver, this extension must not be exposed. This extension guarantees that geometry outside the near and far planes of the clip volume are rendered if the depth test is disabled. If the depth test is enabled the behavior is undefined. Reading gl_FragCoord inside a fragment shader is undefined. This functionality is provided for porting applications that use another popular 3D API and draw pre-transformed and pre-clipped geometry with the depth test disabled. Issues Should we reuse the DEPTH_CLAMP token? UNRESOLVED: Probably not. The behavior is different and the two should not be confused. Applications that detect the presence of ARB_depth_clamp by enabling DEPTH_CLAMP and check for an error may be misguided. What are the interactions with the raster position? UNRESOLVED: Probably the same as in ARB_depth_clamp for the reasons listed there. New Procedures and Functions None New Tokens Accepted by the parameter of Enable, Disable, and IsEnabled, and by the parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: CLIP_ENABLE_MESA 0x???? Additions to Chapter 2 of the OpenGL 3.1 Specification (OpenGL Operation) -- Section 2.17 "Clipping" Add to the end of the 3rd paragraph: "Clipping is enabled with the generic Enable command and disabled with the Disable command. The value of the argument to either command is CLIP_ENABLE_MESA. If depth clamping is enabled, the "-w_c <= z_c <= w_c" plane equation are ignored by view volume clipping (effectively, there is no near or far plane clipping)." If and only if the ARB_compatibility extension is supported: -- Section 2.22 "Current Raster Position" Add to the end of the 4th paragraph: "If clipping (see section 2.17) is disabled, then raster position z_w is first clamped to the range [min(n,f),max(n,f)], where n and f are the current near and far depth range values (see section 2.12.1)." Additions to Chapter 3 of the OpenGL 3.1 Specification (Rasterization) None Additions to Chapter 4 of the OpenGL 3.1 Specification (Per-Fragment Operations and the Framebuffer) -- Section 4.1.5 "Depth buffer test" Add to the end of the 2nd paragraph: "If clipping (see section 2.17) is disabled, and the depth test is enabled, the results are undefined." Additions to Chapter 5 of the OpenGL 3.1 Specification (Special Functions) None Additions to Chapter 6 of the OpenGL 3.1 Specification (State and State Requests) None Additions to the AGL/GLX/WGL Specifications None GLX Protocol None Errors None New State Add to table 6.7, transformation state Get Value Type Get Command Initial Value Description Sec Attribute ---------- ---- ----------- ------------- -------------- ------ ---------------- CLIP_MESA B IsEnabled True Depth clipping 2.12.2 transform/enable on/off New Implementation Dependent State ??? Interactions with ARB_compatibility If ARB_compatibility is not supported, the language about current raster position in section 2.22 is removed.