1Name 2 3 APPLE_vertex_program_evaluators 4 5Name Strings 6 7 GL_APPLE_vertex_program_evaluators 8 9Contact 10 11 Bob Beretta, Apple Inc. (beretta 'at' apple.com) 12 13Version 14 15 1.0 16 17Number 18 19 369 20 21Dependencies 22 23 This extension requires ARB_vertex_program. 24 25Overview 26 27 This extension allows the one- and two-dimensional evaluators to be used 28 with vertex program attributes. The operation of this extension is 29 precisely analogous to the operation of the normal evaluators. 30 31 Where normal evaluators are enabled with Enable(MAP1_VERTEX_3), for 32 example, attribute evaluators are enabled with 33 EnableVertexAttribAPPLE(index, VERTEX_ATTRIB_MAP1_APPLE). 34 35 Where the size (1, 2, 3, or 4) of a normal evaluator is embedded in the 36 token for that evaluator (for example, MAP1_VERTEX_3 has size 3), 37 attribute evaluators give the size as an argument to MapVertexAttrib**APPLE. 38 39 The 1D and 2D evaluator order, domain, and coefficients are given as 40 arguments to MapVertexAttrib**APPLE, with exactly the same meaning and 41 restrictions as the same arguments to Map1f, Map2f, Map1d, & Map2d. 42 The evaluator order, domain, and coefficients may be queried with 43 GetVertexAttrib*vARB, with the same operation as GetMap*v. 44 45Issues 46 47 (1) Normal evaluators provide separate storage for the coefficients of 48 each size of each vertex element. For example, GL_MAP1_VERTEX_3 49 and GL_MAP1_VERTEX_4 indentify separate storage for 3-element vertex 50 coefficients and 4-element vertex coefficients. Does this extension 51 provide separate storage for each possible attribute size, 1, 2, 3, & 4? 52 53 RESOLVED: No. Size is given as a parameter to MapVertexAttrib**APPLE. 54 Storage is only provided for one set of coefficients per vertex attrib 55 index. If MapVertexAttrib**APPLE is called with a <size> of 3, the 56 coefficients associated with any other <size> are replaced. 57 58New Procedures and Functions 59 60 void EnableVertexAttribAPPLE(uint index, enum pname); 61 void DisableVertexAttribAPPLE(uint index, enum pname); 62 boolean IsVertexAttribEnabledAPPLE(uint index, enum pname); 63 void MapVertexAttrib1dAPPLE(uint index, uint size, double u1, double u2, 64 int stride, int order, const double *points); 65 void MapVertexAttrib1fAPPLE(uint index, uint size, float u1, float u2, 66 int stride, int order, const float *points); 67 void MapVertexAttrib2dAPPLE(uint index, uint size, double u1, double u2, 68 int ustride, int uorder, double v1, double v2, int vstride, int vorder, 69 const double *points); 70 void MapVertexAttrib2fAPPLE(uint index, uint size, float u1, float u2, 71 int ustride, int uorder, float v1, float v2, int vstride, int vorder, 72 const float *points); 73 74New Tokens 75 76 Accepted by the <pname> parameter of EnableVertexAttribAPPLE, 77 DisableVertexAttribAPPLE, and IsVertexAttribEnabledAPPLE. 78 79 VERTEX_ATTRIB_MAP1_APPLE 0x8A00 80 VERTEX_ATTRIB_MAP2_APPLE 0x8A01 81 82 Accepted by the <pname> parameter of GetVertexAttribdvARB, 83 GetVertexAttribfvARB, and GetVertexAttribivARB. 84 85 VERTEX_ATTRIB_MAP1_SIZE_APPLE 0x8A02 86 VERTEX_ATTRIB_MAP1_COEFF_APPLE 0x8A03 87 VERTEX_ATTRIB_MAP1_ORDER_APPLE 0x8A04 88 VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 0x8A05 89 VERTEX_ATTRIB_MAP2_SIZE_APPLE 0x8A06 90 VERTEX_ATTRIB_MAP2_COEFF_APPLE 0x8A07 91 VERTEX_ATTRIB_MAP2_ORDER_APPLE 0x8A08 92 VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 0x8A09 93 94Errors 95 96 The error INVALID_VALUE is generated by EnableVertexAttribAPPLE, 97 DisableVertexAttribAPPLE, IsVertexAttribEnabledAPPLE, or 98 MapVertexAttrib**APPLE if <index> is greater than or equal to 99 MAX_VERTEX_ATTRIBS_ARB. 100 101 The error INVALID_ENUM is generated by EnableVertexAttribAPPLE, 102 DisableVertexAttribAPPLE, or IsVertexAttribEnabledAPPLE if <pname> 103 is not VERTEX_ATTRIB_MAP1_APPLE or VERTEX_ATTRIB_MAP2_APPLE. 104 105 The error INVALID_VALUE is generated by MapVertexAttrib**APPLE if 106 <size> is less than 1 or greater than 4. 107 108 The error INVALID_VALUE is generated by MapVertexAttrib1*APPLE if 109 <order> is less than 1 or greater than MAX_EVAL_ORDER. 110 111 The error INVALID_VALUE is generated by MapVertexAttrib2*APPLE if 112 <uorder> or <vorder> are less than 1 or greater than MAX_EVAL_ORDER. 113 114 The error INVALID_VALUE is generated by MapVertexAttrib1*APPLE if 115 <u1> is equal to <u2>. 116 117 The error INVALID_VALUE is generated by MapVertexAttrib2*APPLE if 118 <u1> is equal to <u2> or <v1> is equal to <v2>. 119 120 The error INVALID_VALUE is generated by MapVertexAttrib1*APPLE if 121 <stride> is less than <size>. 122 123 The error INVALID_VALUE is generated by MapVertexAttrib1*APPLE if 124 <ustride> is less than <size> or if <vstride> is less than size. 125 126New State 127 128Get Value Type Get Command Initial Value Description Section 129------------------------------ ------- -------------------------- ------------- ----------------- ------------ 130VERTEX_ATTRIB_MAP1_APPLE 16+xB IsVertexAttribEnabledAPPLE False 1D evaluator enable, eval 131 enabled 132VERTEX_ATTRIB_MAP2_APPLE 16+xB IsVertexAttribEnabledAPPLE False 2D evaluator enable, eval 133 enabled 134VERTEX_ATTRIB_MAP1_SIZE_APPLE 16+xZ4 GetVertexAttribivARB 4 1D evaluator eval 135 size 136VERTEX_ATTRIB_MAP2_SIZE_APPLE 16+xZ4 GetVertexAttribivARB 4 2D evaluator eval 137 size 138VERTEX_ATTRIB_MAP1_ORDER_APPLE 16+xZ+ GetVertexAttribivARB 1 1D evaluator eval 139 order 140VERTEX_ATTRIB_MAP2_ORDER_APPLE 32+xZ+ GetVertexAttribivARB 1, 1 2D evaluator eval 141 order 142VERTEX_ATTRIB_MAP1_COEFF_APPLE N+xRn GetVertexAttribfvARB 0, 0, 0, 1 1D evaluator eval 143 coefficients 144VERTEX_ATTRIB_MAP2_COEFF_APPLE N+xM+xRn GetVertexAttribfvARB 0, 0, 0, 1 2D evaluator eval 145 coefficients 146VERTEX_ATTRIB_MAP1_DOMAIN_APPLE 2+xR GetVertexAttribfvARB 0, 1 1D evaluator eval 147 domain 148VERTEX_ATTRIB_MAP2_DOMAIN_APPLE 4+xR GetVertexAttribfvARB 0, 1, 0, 1 2D evaluator eval 149 domain 150New Implementation Dependent State 151 152 None 153 154