15bd8deadSopenharmony_ci
25bd8deadSopenharmony_ciName
35bd8deadSopenharmony_ci
45bd8deadSopenharmony_ci    EXT_rescale_normal
55bd8deadSopenharmony_ci
65bd8deadSopenharmony_ciName Strings
75bd8deadSopenharmony_ci
85bd8deadSopenharmony_ci    GL_EXT_rescale_normal
95bd8deadSopenharmony_ci
105bd8deadSopenharmony_ciVersion
115bd8deadSopenharmony_ci
125bd8deadSopenharmony_ci    $Date: 1997/07/02 23:38:17 $ $Revision: 1.7 $
135bd8deadSopenharmony_ci
145bd8deadSopenharmony_ciNumber
155bd8deadSopenharmony_ci
165bd8deadSopenharmony_ci    27
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciDependencies
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    None
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciOverview
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    When normal rescaling is enabled a new operation is added to the
255bd8deadSopenharmony_ci    transformation of the normal vector into eye coordinates.  The normal vector 
265bd8deadSopenharmony_ci    is rescaled after it is multiplied by the inverse modelview matrix and 
275bd8deadSopenharmony_ci    before it is normalized.  
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    The rescale factor is chosen so that in many cases normal vectors with unit
305bd8deadSopenharmony_ci    length in object coordinates will not need to be normalized as they
315bd8deadSopenharmony_ci    are transformed into eye coordinates.
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ciNew Procedures and Functions
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    None
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ciNew Tokens
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ci    Accepted by the <cap> parameter of Enable, Disable, and IsEnabled,
405bd8deadSopenharmony_ci    and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv,
415bd8deadSopenharmony_ci    and GetDoublev:
425bd8deadSopenharmony_ci
435bd8deadSopenharmony_ci    RESCALE_NORMAL_EXT 0x803A
445bd8deadSopenharmony_ci
455bd8deadSopenharmony_ciAdditions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    Section 2.10.3
485bd8deadSopenharmony_ci
495bd8deadSopenharmony_ci    Finally, we consider how the ModelView transformation state affects
505bd8deadSopenharmony_ci    normals. Normals are of interest only in eye coordinates, so the rules
515bd8deadSopenharmony_ci    governing their transformation to other coordinate systems are not
525bd8deadSopenharmony_ci    examined.  
535bd8deadSopenharmony_ci
545bd8deadSopenharmony_ci    Normals which have unit length when sent to the GL, have their length
555bd8deadSopenharmony_ci    changed by the inverse of the scaling factor after transformation by
565bd8deadSopenharmony_ci    the model-view inverse matrix when the model-view matrix represents
575bd8deadSopenharmony_ci    a uniform scale. If rescaling is enabled, then normals specified with 
585bd8deadSopenharmony_ci    the Normal command are rescaled after transformation by the ModelView 
595bd8deadSopenharmony_ci    Inverse. 
605bd8deadSopenharmony_ci
615bd8deadSopenharmony_ci    Normals sent to the GL may or may not have unit length. In addition,
625bd8deadSopenharmony_ci    the length of the normals after transformation might be altered due
635bd8deadSopenharmony_ci    to transformation by the model-view inverse matrix. If normalization 
645bd8deadSopenharmony_ci    is enabled, then normals specified with the Normal3 command are 
655bd8deadSopenharmony_ci    normalized after transformation by the model-view inverse matrix and 
665bd8deadSopenharmony_ci    after rescaling if rescaling is enabled.  Normalization and rescaling 
675bd8deadSopenharmony_ci    are controlled with
685bd8deadSopenharmony_ci
695bd8deadSopenharmony_ci        void Enable( enum target);
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    and
725bd8deadSopenharmony_ci
735bd8deadSopenharmony_ci        void Disable( enum target);
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci    with target equal to NORMALIZE or RESCALE_NORMAL. This requires two 
765bd8deadSopenharmony_ci    bits of state.  The initial state is for normals not to be normalized or 
775bd8deadSopenharmony_ci    rescaled.
785bd8deadSopenharmony_ci    .
795bd8deadSopenharmony_ci    .
805bd8deadSopenharmony_ci    .
815bd8deadSopenharmony_ci
825bd8deadSopenharmony_ci    Therefore, if the modelview matrix is M, then the transformed plane equation 
835bd8deadSopenharmony_ci    is
845bd8deadSopenharmony_ci
855bd8deadSopenharmony_ci     (n_x' n_y' n_z' q') = ((n_x n_y n_z q) * (M^-1)),
865bd8deadSopenharmony_ci
875bd8deadSopenharmony_ci    the rescaled normal is  
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci     (n_x" n_y" n_z")  = f * (n_x' n_y' n_z'),
905bd8deadSopenharmony_ci
915bd8deadSopenharmony_ci    and the fully transformed normal is
925bd8deadSopenharmony_ci              
935bd8deadSopenharmony_ci               1                               (n_x")
945bd8deadSopenharmony_ci            ____________                       (n_y")               (2.1)
955bd8deadSopenharmony_ci        __________________________________     (n_z")
965bd8deadSopenharmony_ci       V (n_x")^2 + (n_y")^2 + (n_z")^2
975bd8deadSopenharmony_ci
985bd8deadSopenharmony_ci     If rescaling is disabled then f is 1, otherwise f is computed
995bd8deadSopenharmony_ci     as follows:
1005bd8deadSopenharmony_ci
1015bd8deadSopenharmony_ci     Let m_ij denote the matrix element in row i and column j of M^-1, 
1025bd8deadSopenharmony_ci     numbering the topmost row of the matrix as row 1, and the leftmost 
1035bd8deadSopenharmony_ci     column as column 1. Then 
1045bd8deadSopenharmony_ci
1055bd8deadSopenharmony_ci                              1
1065bd8deadSopenharmony_ci                           __________
1075bd8deadSopenharmony_ci            f =   ________________________________
1085bd8deadSopenharmony_ci                 V (m_31)^2 + (m_32)^2 + (m_33)^2  
1095bd8deadSopenharmony_ci
1105bd8deadSopenharmony_ci     Alternatively, an implementation my chose to normalize the normal
1115bd8deadSopenharmony_ci     instead of rescaling the normal. Then 
1125bd8deadSopenharmony_ci
1135bd8deadSopenharmony_ci                              1
1145bd8deadSopenharmony_ci                           __________
1155bd8deadSopenharmony_ci            f =   ________________________________
1165bd8deadSopenharmony_ci                 V (n_x')^2 + (n_y')^2 + (n_z')^2  
1175bd8deadSopenharmony_ci
1185bd8deadSopenharmony_ci
1195bd8deadSopenharmony_ci     If normalization is disabled, then the square root in equation 2.1 is 
1205bd8deadSopenharmony_ci     replaced with 1, otherwise . . . .
1215bd8deadSopenharmony_ci
1225bd8deadSopenharmony_ci    
1235bd8deadSopenharmony_ciAdditions to Chapter 3 of the 1.1 Specification (Rasterization)
1245bd8deadSopenharmony_ci
1255bd8deadSopenharmony_ci    None
1265bd8deadSopenharmony_ci
1275bd8deadSopenharmony_ciAdditions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations and
1285bd8deadSopenharmony_cithe Framebuffer)
1295bd8deadSopenharmony_ci
1305bd8deadSopenharmony_ci    None
1315bd8deadSopenharmony_ci
1325bd8deadSopenharmony_ciAdditions to Chapter 5 of the 1.1 Specification (Special Functions)
1335bd8deadSopenharmony_ci
1345bd8deadSopenharmony_ci    None
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ciAdditions to Chapter 6 of the 1.1 Specification (State and State Requests)
1375bd8deadSopenharmony_ci
1385bd8deadSopenharmony_ci    None
1395bd8deadSopenharmony_ci
1405bd8deadSopenharmony_ciAdditions to the GLX Specification
1415bd8deadSopenharmony_ci
1425bd8deadSopenharmony_ci    None
1435bd8deadSopenharmony_ci
1445bd8deadSopenharmony_ciGLX Protocol
1455bd8deadSopenharmony_ci
1465bd8deadSopenharmony_ci        None
1475bd8deadSopenharmony_ci
1485bd8deadSopenharmony_ciErrors
1495bd8deadSopenharmony_ci
1505bd8deadSopenharmony_ci    None
1515bd8deadSopenharmony_ci
1525bd8deadSopenharmony_ciNew State
1535bd8deadSopenharmony_ci
1545bd8deadSopenharmony_ci    Get Value           Get Command     Type    Initial Value    Attribute
1555bd8deadSopenharmony_ci    ---------           -----------     ----    -------------    ---------
1565bd8deadSopenharmony_ci    RESCALE_NORMAL_EXT  IsEnabled      B         FALSE           transform/enable
1575bd8deadSopenharmony_ci
1585bd8deadSopenharmony_ci
1595bd8deadSopenharmony_ciNew Implementation Dependent State
1605bd8deadSopenharmony_ci
1615bd8deadSopenharmony_ci    None
162