GL_CLIPDISTANCE - Online Linux Manual PageSection : 3G
Updated : 01/20/2022
Source : [FIXME: source]
Note : [FIXME: manual]

NAMEgl_ClipDistance − provides a forward−compatible mechanism for vertex clipping

DECLARATIONgl_ClipDistance is a member of the gl_PerVertex named block: out gl_PerVertex { vec4 gl_Position; float gl_PointSize; float gl_ClipDistance[]; };In fragment shaders, it is intrinsically declared as: in ​float ​gl_ClipDistance[] ​;

DESCRIPTIONThe gl_ClipDistance variable provides a forward compatible mechanism for controlling user clipping​. The element gl_ClipDistance[i] specifies a clip distance for each user clip plane i​. A distance of 0​.0 means that the vertex is on the plane, a positive distance means that the vertex is inside the clip plane, and a negative distance means that the point is outside the clip plane​. The clip distances will be linearly interpolated across the primitive and the portion of the primitive with interpolated distances less than 0​.0 will be clipped​. The gl_ClipDistance array is initially predeclared as unsized and must be sized by the shader either by redeclaring it with an explicit size, or by indexing it with only integral constant expressions​. The array must be sized to include all clip planes that are enabled via the OpenGL API; if the size does not include all enabled planes, results are undefined​. The size may be at most gl_MaxClipDistances​. The number of varying components consumed by gl_ClipDistance will match the size of the array, no matter how many planes are enabled​. The shader must also set all values in gl_ClipDistance that have been enabled via the OpenGL API, or results are undefined​. Values written into gl_ClipDistance planes that are not enabled have no effect​. In the vertex, tessellation evaluation and geometry languages, a single global instance of the gl_PerVertex named block is available and its gl_ClipDistance member is an output that receives the clip distances for the current vertex​. It may be written at any time during shader execution​. The value written to gl_ClipDistance will be used by primitive assembly, clipping, culling and other fixed functionality operations, if present, that operate on primitives after vertex processing has occurred​. In the tessellation control language, the gl_PerVertex named block is used to construct an array, gl_out[], whose gl_ClipDistance members hold clip distances for each of the control points, which become available as inputs to the subsequent tessellation evaluation shader​. The value of gl_ClipDistance (or the gl_ClipDistance member of the gl_out[] array, in the case of the tessellation control shader) is undefined after the vertex, tessellation control, and tessellation evaluation shading stages if the corresponding shader executable does not write to gl_ClipDistance​. It is also undefined after the geometry processing stage if the geometry shader executable calls EmitVertex() without having written gl_ClipDistance since the last call to EmitVertex() (or hasn't written it at all)​. In the tessellation control, tessellation evaluation and geoemetry languages, the gl_PerVertex named block is used to construct an array, gl_in[] of per−vertex or per−control point inputs whose content represents the corresponding outputs written by the previous stage​. Only elements of the gl_ClipDistance array that correspond to enabled clip planes have defined values​.

VERSION SUPPORT OpenGL Shading Language Version Variable Name 1​.10 none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'>none;'> 1​.20 1​.30 1​.40 1​.50 3​.30 4​.00 4​.10 4​.20 4​.30 4​.40 4​.50 gl_ClipDistance Versions 1​.30 to 1​.40 − vertex shader only​. Versions 1​.50 to 3​.30 − vertex and geometry shaders only​.

SEE ALSOgl_CullDistance(), gl_PointSize()

COPYRIGHTCopyright © 2011−2014 Khronos Group​. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1​.0, 8 June 1999​. http://opencontent​.org/openpub/​.

COPYRIGHT
Copyright © 2011-2014 Khronos Group
0
Johanes Gumabo
Data Size   :   16,923 byte
man-gl_ClipDistance.3GBuild   :   2024-12-05, 20:55   :  
Visitor Screen   :   x
Visitor Counter ( page / site )   :   2 / 232,738
Visitor ID   :     :  
Visitor IP   :   18.226.186.109   :  
Visitor Provider   :   AMAZON-02   :  
Provider Position ( lat x lon )   :   39.962500 x -83.006100   :   x
Provider Accuracy Radius ( km )   :   1000   :  
Provider City   :   Columbus   :  
Provider Province   :   Ohio ,   :   ,
Provider Country   :   United States   :  
Provider Continent   :   North America   :  
Visitor Recorder   :   Version   :  
Visitor Recorder   :   Library   :  
Online Linux Manual Page   :   Version   :   Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page   :   Library   :   lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page   :   Library   :   lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base   :   Version   :   Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base   :   Library   :   lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36

Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.