15bd8deadSopenharmony_ciName 25bd8deadSopenharmony_ci 35bd8deadSopenharmony_ci OES_matrix_palette 45bd8deadSopenharmony_ci 55bd8deadSopenharmony_ciName Strings 65bd8deadSopenharmony_ci 75bd8deadSopenharmony_ci GL_OES_matrix_palette 85bd8deadSopenharmony_ci 95bd8deadSopenharmony_ciContact 105bd8deadSopenharmony_ci 115bd8deadSopenharmony_ci Aaftab Munshi (amunshi@ati.com) 125bd8deadSopenharmony_ci 135bd8deadSopenharmony_ciNotice 145bd8deadSopenharmony_ci 155bd8deadSopenharmony_ci Copyright (c) 2004-2013 The Khronos Group Inc. Copyright terms at 165bd8deadSopenharmony_ci http://www.khronos.org/registry/speccopyright.html 175bd8deadSopenharmony_ci 185bd8deadSopenharmony_ciSpecification Update Policy 195bd8deadSopenharmony_ci 205bd8deadSopenharmony_ci Khronos-approved extension specifications are updated in response to 215bd8deadSopenharmony_ci issues and bugs prioritized by the Khronos OpenGL ES Working Group. For 225bd8deadSopenharmony_ci extensions which have been promoted to a core Specification, fixes will 235bd8deadSopenharmony_ci first appear in the latest version of that core Specification, and will 245bd8deadSopenharmony_ci eventually be backported to the extension document. This policy is 255bd8deadSopenharmony_ci described in more detail at 265bd8deadSopenharmony_ci https://www.khronos.org/registry/OpenGL/docs/update_policy.php 275bd8deadSopenharmony_ci 285bd8deadSopenharmony_ciStatus 295bd8deadSopenharmony_ci 305bd8deadSopenharmony_ci Ratified by the Khronos BOP, Aug 5, 2004. 315bd8deadSopenharmony_ci 325bd8deadSopenharmony_ciVersion 335bd8deadSopenharmony_ci 345bd8deadSopenharmony_ci Version 1, August 2004 355bd8deadSopenharmony_ci 365bd8deadSopenharmony_ciNumber 375bd8deadSopenharmony_ci 385bd8deadSopenharmony_ci OpenGL ES Extension #12 395bd8deadSopenharmony_ci 405bd8deadSopenharmony_ciDependencies 415bd8deadSopenharmony_ci 425bd8deadSopenharmony_ci OpenGL ES 1.0 is required. 435bd8deadSopenharmony_ci 445bd8deadSopenharmony_ciOverview 455bd8deadSopenharmony_ci 465bd8deadSopenharmony_ci This extension adds the ability to support vertex skinning in OpenGL ES. 475bd8deadSopenharmony_ci A simplified version of the ARB_matrix_palette extension is used to 485bd8deadSopenharmony_ci define OES_matrix_palette extension. 495bd8deadSopenharmony_ci 505bd8deadSopenharmony_ci This extension allow OpenGL ES to support a palette of matrices. The matrix 515bd8deadSopenharmony_ci palette defines a set of matrices that can be used to transform a vertex. 525bd8deadSopenharmony_ci The matrix palette is not part of the model view matrix stack and is enabled 535bd8deadSopenharmony_ci by setting the MATRIX_MODE to MATRIX_PALETTE_OES. 545bd8deadSopenharmony_ci 555bd8deadSopenharmony_ci The n vertex units use a palette of m modelview matrices (where n and m are 565bd8deadSopenharmony_ci constrained to implementation defined maxima.) Each vertex has a set of n 575bd8deadSopenharmony_ci indices into the palette, and a corresponding set of n weights. 585bd8deadSopenharmony_ci Matrix indices and weights can be changed for each vertex. 595bd8deadSopenharmony_ci 605bd8deadSopenharmony_ci When this extension is utilized, the enabled units transform each 615bd8deadSopenharmony_ci vertex by the modelview matrices specified by the vertices' 625bd8deadSopenharmony_ci respective indices. These results are subsequently scaled by the 635bd8deadSopenharmony_ci weights of the respective units and then summed to create the 645bd8deadSopenharmony_ci eyespace vertex. 655bd8deadSopenharmony_ci 665bd8deadSopenharmony_ci A similar procedure is followed for normals. Normals, however, 675bd8deadSopenharmony_ci are transformed by the inverse transpose of the modelview matrix. 685bd8deadSopenharmony_ci 695bd8deadSopenharmony_ciIP Status 705bd8deadSopenharmony_ci 715bd8deadSopenharmony_ci Unknown, but believed to be none. 725bd8deadSopenharmony_ci 735bd8deadSopenharmony_ciIssues 745bd8deadSopenharmony_ci 755bd8deadSopenharmony_ci Should this extension be an optional or mandatory extension 765bd8deadSopenharmony_ci 775bd8deadSopenharmony_ci Will be an optional extension since ARB_matrix_palette didn't 785bd8deadSopenharmony_ci see much usage in OpenGL. 795bd8deadSopenharmony_ci 805bd8deadSopenharmony_ci Should we allow the ability to load the current model view matrix 815bd8deadSopenharmony_ci into the matrix palette 825bd8deadSopenharmony_ci 835bd8deadSopenharmony_ci Yes. This will be very helpful since it makes it very easy 845bd8deadSopenharmony_ci to load an object heirarchy. This will also be helpful for JSR184 855bd8deadSopenharmony_ci 865bd8deadSopenharmony_ci Should the Matrix palette be loaded with a new LoadMatrixPalette 875bd8deadSopenharmony_ci command? 885bd8deadSopenharmony_ci 895bd8deadSopenharmony_ci No, although this provides an easy way to support arbitrary 905bd8deadSopenharmony_ci palette sizes, the method loses the current (MultMatrix, 915bd8deadSopenharmony_ci Rotate, Translate, Scale..) matrix functionality. 925bd8deadSopenharmony_ci 935bd8deadSopenharmony_ci Matrices will be Loaded into the palette with current 945bd8deadSopenharmony_ci functions when MATRIX_MODE is MATRIX_PALETTE_OES. The current 955bd8deadSopenharmony_ci palette index is set by an explicit command: 965bd8deadSopenharmony_ci CurrentPaletteMatrixARB(). 975bd8deadSopenharmony_ci 985bd8deadSopenharmony_ci 995bd8deadSopenharmony_ci Should the Matrix Palette have a stack? 1005bd8deadSopenharmony_ci 1015bd8deadSopenharmony_ci Not required, this wastes a lot of space. 1025bd8deadSopenharmony_ci 1035bd8deadSopenharmony_ci 1045bd8deadSopenharmony_ci Should the matrix palette be gettable? 1055bd8deadSopenharmony_ci 1065bd8deadSopenharmony_ci No. 1075bd8deadSopenharmony_ci 1085bd8deadSopenharmony_ci Should MatrixIndexARB be changed to imply LoadMatrix calls to the 1095bd8deadSopenharmony_ci applicable MODELVIEW_MATRIXn stacks? 1105bd8deadSopenharmony_ci 1115bd8deadSopenharmony_ci No, the MODELVIEW_MATRIXn matrices are unused when 1125bd8deadSopenharmony_ci MATRIX_PALETTE is enabled. 1135bd8deadSopenharmony_ci 1145bd8deadSopenharmony_ci 1155bd8deadSopenharmony_ci Should there be a way to specify that the modelview matrices 1165bd8deadSopenharmony_ci for two different vertex units are identical? 1175bd8deadSopenharmony_ci 1185bd8deadSopenharmony_ci Not explicitly, but indexing the matrix palette provides this 1195bd8deadSopenharmony_ci functionality. (Both units will have the same matrix index.) 1205bd8deadSopenharmony_ci 1215bd8deadSopenharmony_ci 1225bd8deadSopenharmony_ciNew Procedures and Functions 1235bd8deadSopenharmony_ci 1245bd8deadSopenharmony_ci void CurrentPaletteMatrixOES(uint index) 1255bd8deadSopenharmony_ci 1265bd8deadSopenharmony_ci void LoadPaletteFromModelViewMatrixOES() 1275bd8deadSopenharmony_ci 1285bd8deadSopenharmony_ci void MatrixIndexPointerOES(int size, enum type, sizei stride, void *pointer) 1295bd8deadSopenharmony_ci 1305bd8deadSopenharmony_ci void WeightPointerOES(int size, enum type, sizei stride, void *pointer); 1315bd8deadSopenharmony_ci 1325bd8deadSopenharmony_ciNew Tokens 1335bd8deadSopenharmony_ci 1345bd8deadSopenharmony_ci Accepted by the <mode> parameter of MatrixMode, and by the 1355bd8deadSopenharmony_ci <cap> parameters of Enable and Disable: 1365bd8deadSopenharmony_ci 1375bd8deadSopenharmony_ci MATRIX_PALETTE_OES 0x8840 1385bd8deadSopenharmony_ci 1395bd8deadSopenharmony_ci Accepted by the <pname> parameters of GetIntegerv: 1405bd8deadSopenharmony_ci 1415bd8deadSopenharmony_ci MAX_PALETTE_MATRICES_OES 0x8842 1425bd8deadSopenharmony_ci MAX_VERTEX_UNITS_OES 0x86A4 1435bd8deadSopenharmony_ci CURRENT_PALETTE_MATRIX_OES 0x8843 1445bd8deadSopenharmony_ci 1455bd8deadSopenharmony_ci The default values for MAX_PALETTE_MATRICES_OES and MAX_VERTEX_UNITS_OES 1465bd8deadSopenharmony_ci are 9 and 3 resp. 1475bd8deadSopenharmony_ci 1485bd8deadSopenharmony_ci Accepted by the <cap> parameters of EnableClientState and DisableClientState and 1495bd8deadSopenharmony_ci by the <pname> parameter of IsEnabled: 1505bd8deadSopenharmony_ci 1515bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_OES 0x8844 1525bd8deadSopenharmony_ci WEIGHT_ARRAY_OES 0x86AD 1535bd8deadSopenharmony_ci 1545bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetIntegerv: 1555bd8deadSopenharmony_ci 1565bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_SIZE_OES 0x8846 1575bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_TYPE_OES 0x8847 1585bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_STRIDE_OES 0x8848 1595bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES 0x8B9E 1605bd8deadSopenharmony_ci 1615bd8deadSopenharmony_ci WEIGHT_ARRAY_SIZE_OES 0x86AB 1625bd8deadSopenharmony_ci WEIGHT_ARRAY_TYPE_OES 0x86A9 1635bd8deadSopenharmony_ci WEIGHT_ARRAY_STRIDE_OES 0x86AA 1645bd8deadSopenharmony_ci WEIGHT_ARRAY_BUFFER_BINDING_OES 0x889E 1655bd8deadSopenharmony_ci 1665bd8deadSopenharmony_ci Accepted by the <pname> parameter of GetPointerv: 1675bd8deadSopenharmony_ci 1685bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_POINTER_OES 0x8849 1695bd8deadSopenharmony_ci WEIGHT_ARRAY_POINTER_OES 0x86AC 1705bd8deadSopenharmony_ci 1715bd8deadSopenharmony_ciAdditions to Chapter 2 of the OpenGL ES 1.0 Specification 1725bd8deadSopenharmony_ci 1735bd8deadSopenharmony_ci - Added to section 2.8 1745bd8deadSopenharmony_ci 1755bd8deadSopenharmony_ci void WeightPointerOES(int size, enum type, sizei stride, void *pointer); 1765bd8deadSopenharmony_ci 1775bd8deadSopenharmony_ci void MatrixIndexPointerOES(int size, enum type, sizei stride, void *pointer); 1785bd8deadSopenharmony_ci 1795bd8deadSopenharmony_ci WeightPointerOES & MatrixIndexPointerOES are used to describe the weights and 1805bd8deadSopenharmony_ci matrix indices used to blend corresponding matrices for a given vertex. 1815bd8deadSopenharmony_ci 1825bd8deadSopenharmony_ci For implementations supporting matrix palette, note that <size> values for 1835bd8deadSopenharmony_ci WeightPointerOES & MatrixIndexPointerOES must be less than or equal to the 1845bd8deadSopenharmony_ci implementation defined value MAX_VERTEX_UNITS_OES. 1855bd8deadSopenharmony_ci 1865bd8deadSopenharmony_ci - Added to table in section 2.8 1875bd8deadSopenharmony_ci 1885bd8deadSopenharmony_ci Command Sizes Types 1895bd8deadSopenharmony_ci ------- ----- ----- 1905bd8deadSopenharmony_ci WeightPointerOES 1..MAX_VERTEX_UNITS_OES fixed, float 1915bd8deadSopenharmony_ci MatrixIndexPointerOES 1..MAX_VERTEX_UNITS_OES ubyte 1925bd8deadSopenharmony_ci 1935bd8deadSopenharmony_ci 1945bd8deadSopenharmony_ci - (section 2.8) Extend the cap flags passed to EnableClientState/DisableClientState 1955bd8deadSopenharmony_ci to include 1965bd8deadSopenharmony_ci 1975bd8deadSopenharmony_ci MATRIX_INDEX_ARRAY_OES, or WEIGHT_ARRAY_OES 1985bd8deadSopenharmony_ci 1995bd8deadSopenharmony_ci - (section 2.10) Add the following: 2005bd8deadSopenharmony_ci 2015bd8deadSopenharmony_ci "The vertex coordinates that are presented to the GL are termed 2025bd8deadSopenharmony_ci object coordinates. The model-view matrix is applied to these 2035bd8deadSopenharmony_ci coordinates to yield eye coordinates. In implementations with 2045bd8deadSopenharmony_ci matrix palette, the matrices specified by the indices per vertex 2055bd8deadSopenharmony_ci are applied to these coordinates and the weighted sum of the 2065bd8deadSopenharmony_ci results are the eye coordinates. Then another matrix, called the 2075bd8deadSopenharmony_ci projection matrix, is applied to eye coordinates to yield clip 2085bd8deadSopenharmony_ci coordinates. A perspective division is carried out on clip 2095bd8deadSopenharmony_ci coordinates to yield normalized device coordinates. 2105bd8deadSopenharmony_ci 2115bd8deadSopenharmony_ci A final viewport transformation is applied to convert these 2125bd8deadSopenharmony_ci coordinates into window coordinates." 2135bd8deadSopenharmony_ci 2145bd8deadSopenharmony_ci "... the vertex's eye coordinates are found as: 2155bd8deadSopenharmony_ci 2165bd8deadSopenharmony_ci (xe) n-1 (xo) 2175bd8deadSopenharmony_ci (ye) = SUM w_i * M_i * (yo) 2185bd8deadSopenharmony_ci (ze) i=0 (zo) 2195bd8deadSopenharmony_ci (we) (wo) 2205bd8deadSopenharmony_ci 2215bd8deadSopenharmony_ci where M_i is the palette matrix associated with the i'th 2225bd8deadSopenharmony_ci Vertex unit: 2235bd8deadSopenharmony_ci 2245bd8deadSopenharmony_ci M_i = MatrixPalette[MatrixIndex[i]], 2255bd8deadSopenharmony_ci if MATRIX_PALETTE_OES is enabled, and 2265bd8deadSopenharmony_ci M_i = MODELVIEW_MATRIX, otherwise. 2275bd8deadSopenharmony_ci 2285bd8deadSopenharmony_ci w_i is the Vertex's associated weight for vertex unit i: 2295bd8deadSopenharmony_ci 2305bd8deadSopenharmony_ci w_i = weight_i, if MATRIX_PALETTE_OES is enabled, 2315bd8deadSopenharmony_ci 1, if MATRIX_PALETTE_OES is disabled, 2325bd8deadSopenharmony_ci 2335bd8deadSopenharmony_ci and, 2345bd8deadSopenharmony_ci 2355bd8deadSopenharmony_ci n = <size> value passed into glMatrixIndexPointerOES." 2365bd8deadSopenharmony_ci 2375bd8deadSopenharmony_ci 2385bd8deadSopenharmony_ci "The projection matrix and model-view matrices are set 2395bd8deadSopenharmony_ci with a variety of commands. The affected matrix is 2405bd8deadSopenharmony_ci determined by the current matrix mode. The current 2415bd8deadSopenharmony_ci matrix mode is set with 2425bd8deadSopenharmony_ci 2435bd8deadSopenharmony_ci void MatrixMode( enum mode ); 2445bd8deadSopenharmony_ci 2455bd8deadSopenharmony_ci which takes one of the pre-defined constants TEXTURE, 2465bd8deadSopenharmony_ci MODELVIEW, PROJECTION, MATRIX_PALETTE_OES. 2475bd8deadSopenharmony_ci 2485bd8deadSopenharmony_ci 2495bd8deadSopenharmony_ci In implementations supporting OES_matrix_palette, 2505bd8deadSopenharmony_ci 2515bd8deadSopenharmony_ci void CurrentPaletteMatrixOES(uint index); 2525bd8deadSopenharmony_ci 2535bd8deadSopenharmony_ci defines which of the palette's matrices is affected by 2545bd8deadSopenharmony_ci subsequent matrix operations when the current matrix mode is 2555bd8deadSopenharmony_ci MATRIX_PALETTE_OES. CurrentPaletteMatrixOES generates the 2565bd8deadSopenharmony_ci error INVALID_VALUE if the <index> parameter is not between 2575bd8deadSopenharmony_ci 0 and MAX_PALETTE_MATRICES_OES - 1. 2585bd8deadSopenharmony_ci 2595bd8deadSopenharmony_ci In implementations supporting OES_matrix_palette, 2605bd8deadSopenharmony_ci 2615bd8deadSopenharmony_ci void LoadPaletteFromModelViewMatrixOES(); 2625bd8deadSopenharmony_ci 2635bd8deadSopenharmony_ci copies the current model view matrix to a matrix in the matrix 2645bd8deadSopenharmony_ci palette, specified by CurrentPaletteMatrixOES. 2655bd8deadSopenharmony_ci 2665bd8deadSopenharmony_ci DrawArrays and DrawElements will not render the primitive if 2675bd8deadSopenharmony_ci the matrix palette was enabled and the weights and/or matrix 2685bd8deadSopenharmony_ci index vertex pointers are disabled or are not valid. 2695bd8deadSopenharmony_ci 2705bd8deadSopenharmony_ci "The state required to implement transformations consists of a 2715bd8deadSopenharmony_ci four-valued integer indicating the current matrix mode, a 2725bd8deadSopenharmony_ci stack of at least two 4 x 4 matrices for each of PROJECTION, 2735bd8deadSopenharmony_ci and TEXTURE with associated stack pointers, a stack of at least 2745bd8deadSopenharmony_ci 32 4 x 4 matrices with an associated stack pointer for MODELVIEW, 2755bd8deadSopenharmony_ci and a set of MAX_PALETTE_MATRICES_OES matrices of at least 9 2765bd8deadSopenharmony_ci 4 x 4 matrices each for the matrix palette. 2775bd8deadSopenharmony_ci 2785bd8deadSopenharmony_ci Initially, there is only one matrix on each stack, and all 2795bd8deadSopenharmony_ci matrices are set to the identity. The initial matrix mode 2805bd8deadSopenharmony_ci is MODELVIEW. 2815bd8deadSopenharmony_ci 2825bd8deadSopenharmony_ci "When matrix palette is enabled, the normal is transformed 2835bd8deadSopenharmony_ci to eye space by: 2845bd8deadSopenharmony_ci 2855bd8deadSopenharmony_ci n-1 2865bd8deadSopenharmony_ci (nx' ny' nz') = (nx ny nz) Inv ( SUM w_i * Mu_i) 2875bd8deadSopenharmony_ci i=0 2885bd8deadSopenharmony_ci 2895bd8deadSopenharmony_ci Alternatively implementations may choose to transform the 2905bd8deadSopenharmony_ci normal to eye-space by: 2915bd8deadSopenharmony_ci 2925bd8deadSopenharmony_ci n-1 2935bd8deadSopenharmony_ci (nx' ny' nz') = SUM w_i * (nx ny nz) Inv(Mu_i) 2945bd8deadSopenharmony_ci i=0 2955bd8deadSopenharmony_ci 2965bd8deadSopenharmony_ci where Mu_i is the upper leftmost 3x3 matrix taken from the 2975bd8deadSopenharmony_ci modelview for vertex unit i (M_i), 2985bd8deadSopenharmony_ci 2995bd8deadSopenharmony_ci M_i = MatrixPalette[MatrixIndex[i]], 3005bd8deadSopenharmony_ci if MATRIX_PALETTE_OES is enabled, and 3015bd8deadSopenharmony_ci M_i = MODELVIEW_MATRIX, otherwise 3025bd8deadSopenharmony_ci 3035bd8deadSopenharmony_ci otherwise. 3045bd8deadSopenharmony_ci 3055bd8deadSopenharmony_ci weight_i is the vertex's associated weight for vertex unit i, 3065bd8deadSopenharmony_ci 3075bd8deadSopenharmony_ci w_i = weight_i 3085bd8deadSopenharmony_ci 3095bd8deadSopenharmony_ci and 3105bd8deadSopenharmony_ci 3115bd8deadSopenharmony_ci n = <size> value passed into glMatrixIndexPointerOES." 3125bd8deadSopenharmony_ci 3135bd8deadSopenharmony_ci 3145bd8deadSopenharmony_ciErrors 3155bd8deadSopenharmony_ci 3165bd8deadSopenharmony_ci INVALID_VALUE is generated if the <size> parameter for 3175bd8deadSopenharmony_ci MatrixIndexPointerOES or WeightPointerOES is greater 3185bd8deadSopenharmony_ci than MAX_VERTEX_UNITS_OES. 3195bd8deadSopenharmony_ci 3205bd8deadSopenharmony_ci INVALID_VALUE is generated if the <count> parameter to 3215bd8deadSopenharmony_ci CurrentPaletteMatrixOES is greater than MAX_PALETTE_MATRICES_OES - 1 3225bd8deadSopenharmony_ci 3235bd8deadSopenharmony_ci 3245bd8deadSopenharmony_ciNew State 3255bd8deadSopenharmony_ci 3265bd8deadSopenharmony_ci(table 6.6, p. 232) 3275bd8deadSopenharmony_ci 3285bd8deadSopenharmony_ci Get Initial 3295bd8deadSopenharmony_ciGet Value Type Command Value Description 3305bd8deadSopenharmony_ci--------- ---- ------- ------- ----------- 3315bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_OES B IsEnabled False matrix index array enable 3325bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_SIZE_OES Z+ GetIntegerv 0 matrix indices per vertex 3335bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_TYPE_OES Z+ GetIntegerv UBYTE type of matrix index data 3345bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_STRIDE_OES Z+ GetIntegerv 0 stride between 3355bd8deadSopenharmony_ci matrix indices 3365bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_POINTER_OES Y GetPointerv 0 pointer to matrix 3375bd8deadSopenharmony_ci index array 3385bd8deadSopenharmony_ci 3395bd8deadSopenharmony_ciWEIGHT_ARRAY_OES B IsEnabled False weight array enable 3405bd8deadSopenharmony_ciWEIGHT_ARRAY_SIZE_OES Z+ GetIntegerv 0 weights per vertex 3415bd8deadSopenharmony_ciWEIGHT_ARRAY_TYPE_OES Z2 GetIntegerv FLOAT type of weight data 3425bd8deadSopenharmony_ciWEIGHT_ARRAY_STRIDE_OES Z+ GetIntegerv 0 stride between weights 3435bd8deadSopenharmony_ci per vertex 3445bd8deadSopenharmony_ciWEIGHT_ARRAY_POINTER_OES Y GetPointerv 0 pointer to weight array 3455bd8deadSopenharmony_ci 3465bd8deadSopenharmony_ci 3475bd8deadSopenharmony_ci(table 6.7, p. 233) 3485bd8deadSopenharmony_ci 3495bd8deadSopenharmony_ci Get Initial 3505bd8deadSopenharmony_ciGet Value Type Command Value Description 3515bd8deadSopenharmony_ci--------- ---- ------- ----- ----------- 3525bd8deadSopenharmony_ci 3535bd8deadSopenharmony_ciMATRIX_INDEX_ARRAY_BUFFER_BINDING_OES Z+ GetIntegerv 0 matrix index array 3545bd8deadSopenharmony_ci buffer binding 3555bd8deadSopenharmony_ci 3565bd8deadSopenharmony_ciWEIGHT_ARRAY_BUFFER_BINDING_OES Z+ GetIntegerv 0 weight array 3575bd8deadSopenharmony_ci buffer binding 3585bd8deadSopenharmony_ci 3595bd8deadSopenharmony_ci(table 6.9, p. 235) 3605bd8deadSopenharmony_ci 3615bd8deadSopenharmony_ci Get Initial 3625bd8deadSopenharmony_ciGet Value Type Command Value Description 3635bd8deadSopenharmony_ci--------- ---- ------- ------- ----------- 3645bd8deadSopenharmony_ci 3655bd8deadSopenharmony_ciMATRIX_PALETTE_OES B IsEnabled False matrix palette enable 3665bd8deadSopenharmony_ciMAX_PALETTE_MATRICES_OES Z+ GetIntegerv 9 size of matrix palette 3675bd8deadSopenharmony_ciMAX_VERTEX_UNITS_OES Z+ GetIntegerv 3 number of matrices per vertex 3685bd8deadSopenharmony_ciCURRENT_PALETTE_MATRIX_OES Z+ GetIntegerv 0 transform index of current 3695bd8deadSopenharmony_ci modelview matrix in the palette, 3705bd8deadSopenharmony_ci as set by CurrentPaletteMatrixOES() 3715bd8deadSopenharmony_ci 3725bd8deadSopenharmony_ci 3735bd8deadSopenharmony_ciRevision History 3745bd8deadSopenharmony_ci 3755bd8deadSopenharmony_ci 3765bd8deadSopenharmony_ci 3775bd8deadSopenharmony_ciAddendum: Using this extension. 3785bd8deadSopenharmony_ci 3795bd8deadSopenharmony_ci /* position viewer */ 3805bd8deadSopenharmony_ci glMatrixMode(GL_MATRIX_PALETTE_OES); 3815bd8deadSopenharmony_ci glCurrentPaletteMatrixOES(0); 3825bd8deadSopenharmony_ci glLoadIdentity(); 3835bd8deadSopenharmony_ci glTranslatef(0.0f, 0.0f, -7.0f); 3845bd8deadSopenharmony_ci glRotatef(yrot, 0.0f, 1.0f, 0.0f); 3855bd8deadSopenharmony_ci 3865bd8deadSopenharmony_ci glCurrentPaletteMatrixOES(1); 3875bd8deadSopenharmony_ci glLoadIdentity(); 3885bd8deadSopenharmony_ci glTranslatef(0.0f, 0.0f, -7.0f); 3895bd8deadSopenharmony_ci 3905bd8deadSopenharmony_ci glRotatef(yrot, 0.0f, 1.0f, 0.0f); 3915bd8deadSopenharmony_ci glRotatef(zrot, 0.0f, 0.0f, 1.0f); 3925bd8deadSopenharmony_ci 3935bd8deadSopenharmony_ci glEnable(GL_MATRIX_PALETTE_OES); 3945bd8deadSopenharmony_ci 3955bd8deadSopenharmony_ci glEnableClientState(GL_VERTEX_ARRAY); 3965bd8deadSopenharmony_ci glEnableClientState(GL_TEXTURE_COORD_ARRAY); 3975bd8deadSopenharmony_ci glEnableClientState(GL_MATRIX_INDEX_ARRAY_OES); 3985bd8deadSopenharmony_ci glEnableClientState(GL_WEIGHT_ARRAY_OES); 3995bd8deadSopenharmony_ci 4005bd8deadSopenharmony_ci glVertexPointer(3, GL_FLOAT, 7 * sizeof(GLfloat), vertexdata); 4015bd8deadSopenharmony_ci glTexCoordPointer(2, GL_FLOAT, 7 * sizeof(GLfloat), vertexdata + 3); 4025bd8deadSopenharmony_ci glWeightPointerOES(2, GL_FLOAT, 7 * sizeof(GLfloat),vertexdata + 5); 4035bd8deadSopenharmony_ci glMatrixIndexPointerOES(2, GL_UNSIGNED_BYTE, 0, matrixindexdata); 4045bd8deadSopenharmony_ci 4055bd8deadSopenharmony_ci for(int i = 0; i < (numSegments << 2) + 2; i ++) 4065bd8deadSopenharmony_ci glDrawArrays(GL_TRIANGLE_FAN, i << 2, 4); 4075bd8deadSopenharmony_ci 408