15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci SGIX_reference_plane 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName String 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_SGIX_reference_plane 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciVersion 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci $Date: 1996/03/08 00:11:51 $ $Revision: 1.5 $ 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNumber 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci 60 165bd8deadSopenharmony_ci 175bd8deadSopenharmony_ciDependencies 185bd8deadSopenharmony_ci 195bd8deadSopenharmony_ci None 205bd8deadSopenharmony_ci 215bd8deadSopenharmony_ciOverview 225bd8deadSopenharmony_ci 235bd8deadSopenharmony_ci This extension allows a group of coplanar primitives to be rendered 245bd8deadSopenharmony_ci without depth-buffering artifacts. This is accomplished by generating 255bd8deadSopenharmony_ci the depth values for all the primitives from a single ``reference plane'' 265bd8deadSopenharmony_ci rather than from the primitives themselves. This ensures that all the 275bd8deadSopenharmony_ci primitives in the group have exactly the same depth value at any given 285bd8deadSopenharmony_ci sample point, no matter what imprecision may exist in the original 295bd8deadSopenharmony_ci specifications of the primitives or in the GL's coordinate transformation 305bd8deadSopenharmony_ci process. 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ci The reference plane is defined by a four-component plane equation. 335bd8deadSopenharmony_ci When glReferencePlaneSGIX is called, equation is transformed by the 345bd8deadSopenharmony_ci transpose-adjoint of a matrix that is the complete object-coordinate 355bd8deadSopenharmony_ci to clip-coordinate transformation. The resulting clip-coordinate 365bd8deadSopenharmony_ci coefficients are transformed by the current viewport when the reference 375bd8deadSopenharmony_ci plane is enabled. 385bd8deadSopenharmony_ci 395bd8deadSopenharmony_ci The reference plane is enabled and disabled with glEnable and glDisable. 405bd8deadSopenharmony_ci 415bd8deadSopenharmony_ci If the reference plane is enabled, a fragment (xf,yf,zf) will have a 425bd8deadSopenharmony_ci new z coordinate generated from (xf,yf) by giving it the same z value 435bd8deadSopenharmony_ci that the reference plane would have at (xf,yf). 445bd8deadSopenharmony_ci 455bd8deadSopenharmony_ciIssues 465bd8deadSopenharmony_ci 475bd8deadSopenharmony_ci * What should the default reference plane be? 485bd8deadSopenharmony_ci - (0,0,1,0) in window coords seems good 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci * What happens if the reference plane does not intersect the view frustum? 515bd8deadSopenharmony_ci - can disallow enabling of the plane, or substitute the default plane. 525bd8deadSopenharmony_ci 535bd8deadSopenharmony_ci * Should it be possible to query the validity of the reference plane just 545bd8deadSopenharmony_ci like RasterPos? 555bd8deadSopenharmony_ci - could be useful 565bd8deadSopenharmony_ci 575bd8deadSopenharmony_ciNew Procedures and Functions 585bd8deadSopenharmony_ci 595bd8deadSopenharmony_ci void glReferencePlaneSGIX(const GLdouble *equation); 605bd8deadSopenharmony_ci 615bd8deadSopenharmony_ciNew Tokens 625bd8deadSopenharmony_ci 635bd8deadSopenharmony_ci Accepted by the <pname> parameter of glGet, and the <cap> parameter 645bd8deadSopenharmony_ci of glEnable, glDisable, and glIsEnabled: 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci REFERENCE_PLANE_SGIX 675bd8deadSopenharmony_ci 685bd8deadSopenharmony_ci Accepted by the <pname> parameter of glGet: 695bd8deadSopenharmony_ci 705bd8deadSopenharmony_ci REFERENCE_PLANE_EQUATION_SGIX 715bd8deadSopenharmony_ci 725bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.0 Specification (OpenGL Operation) 735bd8deadSopenharmony_ci 745bd8deadSopenharmony_ci None 755bd8deadSopenharmony_ci 765bd8deadSopenharmony_ciadditions to Chapter 3 of the 1.0 Specification (Rasterization) 775bd8deadSopenharmony_ci 785bd8deadSopenharmony_ci If enabled, the reference plane is used to calculate the fragment's z 795bd8deadSopenharmony_ci value based on the fragment's x and y values and the reference plane 805bd8deadSopenharmony_ci itself. 815bd8deadSopenharmony_ci 825bd8deadSopenharmony_ci Let the reference plane be defined by a four-component plane equation 835bd8deadSopenharmony_ci in window coordinates. 845bd8deadSopenharmony_ci 855bd8deadSopenharmony_ci a*x + b*y + c*z + d = 0.0 865bd8deadSopenharmony_ci 875bd8deadSopenharmony_ci then if the incoming fragment has an x value of xf and a y value of yf, 885bd8deadSopenharmony_ci the fragment's z value zf will be: 895bd8deadSopenharmony_ci 905bd8deadSopenharmony_ci zf = -(d + a*xf + b*yf) / c; 915bd8deadSopenharmony_ci 925bd8deadSopenharmony_ci The generated zf is undefined if it falls outside the valid zbuffer range. 935bd8deadSopenharmony_ci (That is what KONA does). 945bd8deadSopenharmony_ci 955bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.0 Specification (Per-Fragment Operations 965bd8deadSopenharmony_ciand the Frame Buffer) 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci None 995bd8deadSopenharmony_ci 1005bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.0 Specification (Special Functions) 1015bd8deadSopenharmony_ci 1025bd8deadSopenharmony_ci None 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.0 Specification (State and State Requests) 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci None 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ciAdditions to the GLX Specification 1095bd8deadSopenharmony_ci 1105bd8deadSopenharmony_ci A new GL rendering command is needed to support 1115bd8deadSopenharmony_ci ReferencePlaneSGIX(). The following command is sent to the 1125bd8deadSopenharmony_ci server as part of a glXRender request: 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci ReferencePlaneSGIX 1155bd8deadSopenharmony_ci 2 20 rendering command length 1165bd8deadSopenharmony_ci 2 TBD rendering command opcode 1175bd8deadSopenharmony_ci 4 FLOAT32 a (x coefficient) of plane equation 1185bd8deadSopenharmony_ci 4 FLOAT32 b (y coefficient) of plane equation 1195bd8deadSopenharmony_ci 4 FLOAT32 c (z coefficient) of plane equation 1205bd8deadSopenharmony_ci 4 FLOAT32 d (constant term) of plane equation 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ci No new protocol is required to handle state retrieval. 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ciErrors 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci INVALID_OPERATION is generated if ReferencePlaneSGIX is called between 1275bd8deadSopenharmony_ci execution of Begin and the corresponding execution of End. 1285bd8deadSopenharmony_ci 1295bd8deadSopenharmony_ciNew State 1305bd8deadSopenharmony_ci 1315bd8deadSopenharmony_ci Get Value Get Command Type Initial Value Attrib 1325bd8deadSopenharmony_ci --------- ----------- ---- ------------- ------ 1335bd8deadSopenharmony_ci REFERENCE_PLANE_SGIX IsEnabled B FALSE transform/enable 1345bd8deadSopenharmony_ci REFERENCE_PLANE_EQUATION_SGIX GetFloatv V ??? transform 1355bd8deadSopenharmony_ci 1365bd8deadSopenharmony_ci The plane coefficiants returned by Get() are in clip coordinates. 1375bd8deadSopenharmony_ci 138