142 :(NSArray *)pointInfo
143 scale:(GLfloat)scale
144 colorComps:(float[4])colorComps
145 overallAlpha:(GLfloat)alpha
146 data:(GLfloat *)ioBuffer
147{
148 GLfloat x1, y1, a1, x2, y2, a2;
149 GLfloat r, g, b, a;
150
151 if ([pointInfo
count] >= 6)
152 {
153 a1 = [pointInfo oo_floatAtIndex:0];
154 x1 = [pointInfo oo_floatAtIndex:1] * scale;
155 y1 = [pointInfo oo_floatAtIndex:2] * scale;
156 a2 = [pointInfo oo_floatAtIndex:3];
157 x2 = [pointInfo oo_floatAtIndex:4] * scale;
158 y2 = [pointInfo oo_floatAtIndex:5] * scale;
159 r = colorComps[0];
160 g = colorComps[1];
161 b = colorComps[2];
162 a = colorComps[3];
163
164
165
166
167
168
169 a1 = OOClamp_0_1_f(OOClamp_0_1_f(a1 * a) * alpha);
170 a2 = OOClamp_0_1_f(OOClamp_0_1_f(a2 * a) * alpha);
171 }
172 else
173 {
174
175 x1 = -0.01f;
176 x2 = 0.01f;
177 y1 = y2 = 0.0f;
178 r = 1.0f;
179 g = b = 0.0f;
180 a1 = a2 = 1.0;
181 }
182
183 *ioBuffer++ = x1;
184 *ioBuffer++ = y1;
185 *ioBuffer++ = r;
186 *ioBuffer++ = g;
187 *ioBuffer++ = b;
188 *ioBuffer++ = a1;
189
190 *ioBuffer++ = x2;
191 *ioBuffer++ = y2;
192 *ioBuffer++ = r;
193 *ioBuffer++ = g;
194 *ioBuffer++ = b;
195 *ioBuffer++ = a2;
196
197 (void)ioBuffer;
198}