15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    IMG_user_clip_plane 
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_IMG_user_clip_plane 
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciNotice
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Copyright Imagination Technologies Limited, 2005.
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContact
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Imagination Technologies
165bd8deadSopenharmony_ci
175bd8deadSopenharmony_ciStatus
185bd8deadSopenharmony_ci
195bd8deadSopenharmony_ci    FINAL
205bd8deadSopenharmony_ci
215bd8deadSopenharmony_ciVersion
225bd8deadSopenharmony_ci
235bd8deadSopenharmony_ci    1.0, 11 May 2009
245bd8deadSopenharmony_ci
255bd8deadSopenharmony_ciNumber
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ci    OpenGL ES Extension #57
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ciDependencies
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ci    The extension is written against the OpenGLES 1.0 Specification.
325bd8deadSopenharmony_ci 
335bd8deadSopenharmony_ciOverview
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    The OpenGL ES 1.0 Specification does not support user clip planes. This extension
365bd8deadSopenharmony_ci    adds the support for clip planes. This extension was superceded by OpenGL ES 1.1
375bd8deadSopenharmony_ci
385bd8deadSopenharmony_ciIP Status
395bd8deadSopenharmony_ci
405bd8deadSopenharmony_ci    None
415bd8deadSopenharmony_ci
425bd8deadSopenharmony_ciIssues
435bd8deadSopenharmony_ci
445bd8deadSopenharmony_ci    None
455bd8deadSopenharmony_ci
465bd8deadSopenharmony_ciNew Procedures and Functions
475bd8deadSopenharmony_ci
485bd8deadSopenharmony_ci    For the COMMON profile:
495bd8deadSopenharmony_ci        void ClipPlanefIMG( GLenum p, GLfloat eqn[4] );
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    For the COMMON_LITE profile:
525bd8deadSopenharmony_ci        void ClipPlanexIMG( GLenum p, GLfixed eqn[4] );
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci
555bd8deadSopenharmony_ci
565bd8deadSopenharmony_ciNew Tokens
575bd8deadSopenharmony_ci
585bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetIntegerv function: 
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ci        MAX_CLIP_PLANES_IMG               0x0D32
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci    Accepted by the <pname> parameter of ClipPlanef, ClipPlanex, Enable and Disable:
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci        CLIP_PLANE0_IMG                   0x3000
655bd8deadSopenharmony_ci        CLIP_PLANE1_IMG                   0x3001
665bd8deadSopenharmony_ci        CLIP_PLANE2_IMG                   0x3002
675bd8deadSopenharmony_ci        CLIP_PLANE3_IMG                   0x3003
685bd8deadSopenharmony_ci        CLIP_PLANE4_IMG                   0x3004
695bd8deadSopenharmony_ci        CLIP_PLANE5_IMG                   0x3005
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ciAdditions to OpenGLES 1.0 Specification 
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    Additions to Chapter 2.11 of the OpenGL ES 1.0 Specification (Clipping)    
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci	(append after the last paragraph, after: "User-specified clipping [...]")
785bd8deadSopenharmony_ci        In the presence of IMG_user_clip_plane a number of 6 clip planes will be
795bd8deadSopenharmony_ci        exported to the user. The clip planes will restrict the view volume by defining
805bd8deadSopenharmony_ci        half spaces. The intersection between those half spaces and the view volume
815bd8deadSopenharmony_ci        defined by the back and front clipping plane represents the space where the
825bd8deadSopenharmony_ci        geometry will be clipped. To define a clip plane the application must provide
835bd8deadSopenharmony_ci        a plane equation by calling:
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci            ClipPlanefIMG(enum p, float eqn[4])
865bd8deadSopenharmony_ci            ClipPlanexIMG(enum p, fixed eqn[4])
875bd8deadSopenharmony_ci
885bd8deadSopenharmony_ci        where p describes which clip plane is currently set, CLIP_PLANEi, and eqn are 4
895bd8deadSopenharmony_ci        floating point values, in COMMON profile and 4 fixed values in COMMON_LITE
905bd8deadSopenharmony_ci        profile. The equation is represented by 4 values p1, p2, p3 and p4 which are
915bd8deadSopenharmony_ci        multiplied by the inverse of the modelview matrix transforming them into
925bd8deadSopenharmony_ci        eye space. 
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ci            ( p1' p2' p3' p4' ) = ( p1 p2 p3 p4 ) M^-1
955bd8deadSopenharmony_ci
965bd8deadSopenharmony_ci        Any vertex in eye space that satisfies the mathematical inequality will not be
975bd8deadSopenharmony_ci        clipped, becuase they are located in the positive half space of the clip plane:
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci            ( p1' p2' p3' p4' )  ( x y z w )^T >= 0
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci        Clip planes need to be enabled in order to be used and this is done using
1025bd8deadSopenharmony_ci
1035bd8deadSopenharmony_ci            Enable(enum p)
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci        where p is one of the clip planes enumerants, CLIP_PLANEi. If geometry is drawn
1065bd8deadSopenharmony_ci        with a specific clip plane enabled without specifing the clip plane equation
1075bd8deadSopenharmony_ci        the clipping results are undefined.
1085bd8deadSopenharmony_ci
1095bd8deadSopenharmony_ci        To disable a clip plane, which is to disable clipping by that plane an application
1105bd8deadSopenharmony_ci        must call
1115bd8deadSopenharmony_ci
1125bd8deadSopenharmony_ci            Disable(enum p)
1135bd8deadSopenharmony_ci
1145bd8deadSopenharmony_ci        where p is one of the clip planes enumerants, CLIP_PLANEi.
1155bd8deadSopenharmony_ci
1165bd8deadSopenharmony_ci        Even though this extension specifies a number of 6 clip planes more can be exported
1175bd8deadSopenharmony_ci        by different implementations. To find the maximum number of clip planes exported
1185bd8deadSopenharmony_ci        an application must call
1195bd8deadSopenharmony_ci
1205bd8deadSopenharmony_ci            GetIntegerv(enum p, int *params)
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci        Where p is MAX_CLIP_PLANES_IMG. After a call to this function <params> will contain
1235bd8deadSopenharmony_ci        the number of clip planes exported by that particular extension.
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ciErrors
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ci    INVALID_ENUM is generated by ClipPlanefIMG, ClipPlanexIMG, Enable and Disable if the 
1285bd8deadSopenharmony_ci    <pname> parameter is not one of the clip plane defines.
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ciNew State
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ci    Get Value			    Get Command    Type    Initial Value    Attribute
1335bd8deadSopenharmony_ci    ---------			    -----------    ----    -------------    ---------
1345bd8deadSopenharmony_ci    MAX_CLIP_PLANES_IMG      GetIntegerv    N+      6                user clip planes
1355bd8deadSopenharmony_ci 
1365bd8deadSopenharmony_ci
1375bd8deadSopenharmony_ciConformance Testing
1385bd8deadSopenharmony_ci
1395bd8deadSopenharmony_ci    An easy way to test the conformance of user clip planes is to set up an ortographic 
1405bd8deadSopenharmony_ci    projection and use all clip planes, together and separate, oriented across the 3 axes
1415bd8deadSopenharmony_ci    (negative and positive), and check for correct geometry clipping.
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ciRevision History
1445bd8deadSopenharmony_ci    
1455bd8deadSopenharmony_ci    0.1, 17/2/2004 vs:  Initial revision.
1465bd8deadSopenharmony_ci    0.2, 3/11/2004 bcb: Renamed entrypoints to add IMG suffix.
1475bd8deadSopenharmony_ci    0.3, 25/01/2005 nt: Added copyright notice and Number paragraph placeholder.
1485bd8deadSopenharmony_ci    1.0, 11/05/2009 bcb: Final cleanup for publication
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci
151