• Home
  • Raw
  • Download

Lines Matching refs:dst

17 void L8::readColor(gl::ColorF *dst, const L8 *src)  in readColor()  argument
20 dst->red = lum; in readColor()
21 dst->green = lum; in readColor()
22 dst->blue = lum; in readColor()
23 dst->alpha = 1.0f; in readColor()
26 void L8::writeColor(L8 *dst, const gl::ColorF *src) in writeColor() argument
28 dst->L = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
31 void L8::average(L8 *dst, const L8 *src1, const L8 *src2) in average() argument
33 dst->L = gl::average(src1->L, src2->L); in average()
36 void R8::readColor(gl::ColorUI *dst, const R8 *src) in readColor() argument
38 dst->red = src->R; in readColor()
39 dst->green = 0; in readColor()
40 dst->blue = 0; in readColor()
41 dst->alpha = 1; in readColor()
44 void R8::readColor(gl::ColorF *dst, const R8 *src) in readColor() argument
46 dst->red = gl::normalizedToFloat(src->R); in readColor()
47 dst->green = 0.0f; in readColor()
48 dst->blue = 0.0f; in readColor()
49 dst->alpha = 1.0f; in readColor()
52 void R8::writeColor(R8 *dst, const gl::ColorUI *src) in writeColor() argument
54 dst->R = static_cast<uint8_t>(src->red); in writeColor()
57 void R8::writeColor(R8 *dst, const gl::ColorF *src) in writeColor() argument
59 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
62 void R8::average(R8 *dst, const R8 *src1, const R8 *src2) in average() argument
64 dst->R = gl::average(src1->R, src2->R); in average()
67 void A8::readColor(gl::ColorF *dst, const A8 *src) in readColor() argument
69 dst->red = 0.0f; in readColor()
70 dst->green = 0.0f; in readColor()
71 dst->blue = 0.0f; in readColor()
72 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
75 void A8::writeColor(A8 *dst, const gl::ColorF *src) in writeColor() argument
77 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
80 void A8::average(A8 *dst, const A8 *src1, const A8 *src2) in average() argument
82 dst->A = gl::average(src1->A, src2->A); in average()
85 void L8A8::readColor(gl::ColorF *dst, const L8A8 *src) in readColor() argument
88 dst->red = lum; in readColor()
89 dst->green = lum; in readColor()
90 dst->blue = lum; in readColor()
91 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
94 void L8A8::writeColor(L8A8 *dst, const gl::ColorF *src) in writeColor() argument
96 dst->L = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
97 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
100 void L8A8::average(L8A8 *dst, const L8A8 *src1, const L8A8 *src2) in average() argument
102 *(uint16_t *)dst = (((*(uint16_t *)src1 ^ *(uint16_t *)src2) & 0xFEFE) >> 1) + in average()
106 void A8L8::readColor(gl::ColorF *dst, const A8L8 *src) in readColor() argument
109 dst->red = lum; in readColor()
110 dst->green = lum; in readColor()
111 dst->blue = lum; in readColor()
112 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
115 void A8L8::writeColor(A8L8 *dst, const gl::ColorF *src) in writeColor() argument
117 dst->L = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
118 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
121 void A8L8::average(A8L8 *dst, const A8L8 *src1, const A8L8 *src2) in average() argument
123 *(uint16_t *)dst = (((*(uint16_t *)src1 ^ *(uint16_t *)src2) & 0xFEFE) >> 1) + in average()
127 void R8G8::readColor(gl::ColorUI *dst, const R8G8 *src) in readColor() argument
129 dst->red = src->R; in readColor()
130 dst->green = src->G; in readColor()
131 dst->blue = 0; in readColor()
132 dst->alpha = 1; in readColor()
135 void R8G8::readColor(gl::ColorF *dst, const R8G8 *src) in readColor() argument
137 dst->red = gl::normalizedToFloat(src->R); in readColor()
138 dst->green = gl::normalizedToFloat(src->G); in readColor()
139 dst->blue = 0.0f; in readColor()
140 dst->alpha = 1.0f; in readColor()
143 void R8G8::writeColor(R8G8 *dst, const gl::ColorUI *src) in writeColor() argument
145 dst->R = static_cast<uint8_t>(src->red); in writeColor()
146 dst->G = static_cast<uint8_t>(src->green); in writeColor()
149 void R8G8::writeColor(R8G8 *dst, const gl::ColorF *src) in writeColor() argument
151 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
152 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
155 void R8G8::average(R8G8 *dst, const R8G8 *src1, const R8G8 *src2) in average() argument
157 *(uint16_t *)dst = (((*(uint16_t *)src1 ^ *(uint16_t *)src2) & 0xFEFE) >> 1) + in average()
161 void R8G8B8::readColor(gl::ColorUI *dst, const R8G8B8 *src) in readColor() argument
163 dst->red = src->R; in readColor()
164 dst->green = src->G; in readColor()
165 dst->blue = src->G; in readColor()
166 dst->alpha = 1; in readColor()
169 void R8G8B8::readColor(gl::ColorF *dst, const R8G8B8 *src) in readColor() argument
171 dst->red = gl::normalizedToFloat(src->R); in readColor()
172 dst->green = gl::normalizedToFloat(src->G); in readColor()
173 dst->blue = gl::normalizedToFloat(src->B); in readColor()
174 dst->alpha = 1.0f; in readColor()
177 void R8G8B8::writeColor(R8G8B8 *dst, const gl::ColorUI *src) in writeColor() argument
179 dst->R = static_cast<uint8_t>(src->red); in writeColor()
180 dst->G = static_cast<uint8_t>(src->green); in writeColor()
181 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
184 void R8G8B8::writeColor(R8G8B8 *dst, const gl::ColorF *src) in writeColor() argument
186 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
187 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
188 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
191 void R8G8B8::average(R8G8B8 *dst, const R8G8B8 *src1, const R8G8B8 *src2) in average() argument
193 dst->R = gl::average(src1->R, src2->R); in average()
194 dst->G = gl::average(src1->G, src2->G); in average()
195 dst->B = gl::average(src1->B, src2->B); in average()
198 void B8G8R8::readColor(gl::ColorUI *dst, const B8G8R8 *src) in readColor() argument
200 dst->red = src->R; in readColor()
201 dst->green = src->G; in readColor()
202 dst->blue = src->G; in readColor()
203 dst->alpha = 1; in readColor()
206 void B8G8R8::readColor(gl::ColorF *dst, const B8G8R8 *src) in readColor() argument
208 dst->red = gl::normalizedToFloat(src->R); in readColor()
209 dst->green = gl::normalizedToFloat(src->G); in readColor()
210 dst->blue = gl::normalizedToFloat(src->B); in readColor()
211 dst->alpha = 1.0f; in readColor()
214 void B8G8R8::writeColor(B8G8R8 *dst, const gl::ColorUI *src) in writeColor() argument
216 dst->R = static_cast<uint8_t>(src->red); in writeColor()
217 dst->G = static_cast<uint8_t>(src->green); in writeColor()
218 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
221 void B8G8R8::writeColor(B8G8R8 *dst, const gl::ColorF *src) in writeColor() argument
223 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
224 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
225 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
228 void B8G8R8::average(B8G8R8 *dst, const B8G8R8 *src1, const B8G8R8 *src2) in average() argument
230 dst->R = gl::average(src1->R, src2->R); in average()
231 dst->G = gl::average(src1->G, src2->G); in average()
232 dst->B = gl::average(src1->B, src2->B); in average()
235 void R5G6B5::readColor(gl::ColorF *dst, const R5G6B5 *src) in readColor() argument
237 dst->red = gl::normalizedToFloat<5>(gl::getShiftedData<5, 11>(src->RGB)); in readColor()
238 dst->green = gl::normalizedToFloat<6>(gl::getShiftedData<6, 5>(src->RGB)); in readColor()
239 dst->blue = gl::normalizedToFloat<5>(gl::getShiftedData<5, 0>(src->RGB)); in readColor()
240 dst->alpha = 1.0f; in readColor()
243 void R5G6B5::writeColor(R5G6B5 *dst, const gl::ColorF *src) in writeColor() argument
245 dst->RGB = gl::shiftData<5, 11>(gl::floatToNormalized<5, uint16_t>(src->red)) | in writeColor()
250 void R5G6B5::average(R5G6B5 *dst, const R5G6B5 *src1, const R5G6B5 *src2) in average() argument
252 dst->RGB = gl::shiftData<5, 11>(gl::average(gl::getShiftedData<5, 11>(src1->RGB), in average()
260 void B5G6R5::readColor(gl::ColorF *dst, const B5G6R5 *src) in readColor() argument
262 dst->red = gl::normalizedToFloat<5>(gl::getShiftedData<5, 11>(src->BGR)); in readColor()
263 dst->green = gl::normalizedToFloat<6>(gl::getShiftedData<6, 5>(src->BGR)); in readColor()
264 dst->blue = gl::normalizedToFloat<5>(gl::getShiftedData<5, 0>(src->BGR)); in readColor()
265 dst->alpha = 1.0f; in readColor()
268 void B5G6R5::writeColor(B5G6R5 *dst, const gl::ColorF *src) in writeColor() argument
270 dst->BGR = gl::shiftData<5, 0>(gl::floatToNormalized<5, unsigned short>(src->blue)) | in writeColor()
275 void B5G6R5::average(B5G6R5 *dst, const B5G6R5 *src1, const B5G6R5 *src2) in average() argument
277 dst->BGR = gl::shiftData<5, 11>(gl::average(gl::getShiftedData<5, 11>(src1->BGR), in average()
285 void A8R8G8B8::readColor(gl::ColorUI *dst, const A8R8G8B8 *src) in readColor() argument
287 dst->red = src->R; in readColor()
288 dst->green = src->G; in readColor()
289 dst->blue = src->B; in readColor()
290 dst->alpha = src->A; in readColor()
293 void A8R8G8B8::readColor(gl::ColorF *dst, const A8R8G8B8 *src) in readColor() argument
295 dst->red = gl::normalizedToFloat(src->R); in readColor()
296 dst->green = gl::normalizedToFloat(src->G); in readColor()
297 dst->blue = gl::normalizedToFloat(src->B); in readColor()
298 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
301 void A8R8G8B8::writeColor(A8R8G8B8 *dst, const gl::ColorUI *src) in writeColor() argument
303 dst->R = static_cast<uint8_t>(src->red); in writeColor()
304 dst->G = static_cast<uint8_t>(src->green); in writeColor()
305 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
306 dst->A = static_cast<uint8_t>(src->alpha); in writeColor()
309 void A8R8G8B8::writeColor(A8R8G8B8 *dst, const gl::ColorF *src) in writeColor() argument
311 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
312 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
313 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
314 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
317 void A8R8G8B8::average(A8R8G8B8 *dst, const A8R8G8B8 *src1, const A8R8G8B8 *src2) in average() argument
319 *(uint32_t *)dst = (((*(uint32_t *)src1 ^ *(uint32_t *)src2) & 0xFEFEFEFE) >> 1) + in average()
323 void R8G8B8A8::readColor(gl::ColorUI *dst, const R8G8B8A8 *src) in readColor() argument
325 dst->red = src->R; in readColor()
326 dst->green = src->G; in readColor()
327 dst->blue = src->B; in readColor()
328 dst->alpha = src->A; in readColor()
331 void R8G8B8A8::readColor(gl::ColorF *dst, const R8G8B8A8 *src) in readColor() argument
333 dst->red = gl::normalizedToFloat(src->R); in readColor()
334 dst->green = gl::normalizedToFloat(src->G); in readColor()
335 dst->blue = gl::normalizedToFloat(src->B); in readColor()
336 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
339 void R8G8B8A8::writeColor(R8G8B8A8 *dst, const gl::ColorUI *src) in writeColor() argument
341 dst->R = static_cast<uint8_t>(src->red); in writeColor()
342 dst->G = static_cast<uint8_t>(src->green); in writeColor()
343 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
344 dst->A = static_cast<uint8_t>(src->alpha); in writeColor()
347 void R8G8B8A8::writeColor(R8G8B8A8 *dst, const gl::ColorF *src) in writeColor() argument
349 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
350 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
351 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
352 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
355 void R8G8B8A8::average(R8G8B8A8 *dst, const R8G8B8A8 *src1, const R8G8B8A8 *src2) in average() argument
357 *(uint32_t *)dst = (((*(uint32_t *)src1 ^ *(uint32_t *)src2) & 0xFEFEFEFE) >> 1) + in average()
361 void R8G8B8A8SRGB::readColor(gl::ColorF *dst, const R8G8B8A8SRGB *src) in readColor() argument
363 dst->red = gl::normalizedToFloat(src->R); in readColor()
364 dst->green = gl::normalizedToFloat(src->G); in readColor()
365 dst->blue = gl::normalizedToFloat(src->B); in readColor()
366 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
369 void R8G8B8A8SRGB::writeColor(R8G8B8A8SRGB *dst, const gl::ColorF *src) in writeColor() argument
371 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
372 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
373 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
374 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
377 void R8G8B8A8SRGB::average(R8G8B8A8SRGB *dst, const R8G8B8A8SRGB *src1, const R8G8B8A8SRGB *src2) in average() argument
379 dst->R = gl::linearToSRGB((gl::sRGBToLinear(src1->R) + gl::sRGBToLinear(src2->R)) * 0.5f); in average()
380 dst->G = gl::linearToSRGB((gl::sRGBToLinear(src1->G) + gl::sRGBToLinear(src2->G)) * 0.5f); in average()
381 dst->B = gl::linearToSRGB((gl::sRGBToLinear(src1->B) + gl::sRGBToLinear(src2->B)) * 0.5f); in average()
382 dst->A = static_cast<uint8_t>( in average()
386 void B8G8R8A8::readColor(gl::ColorUI *dst, const B8G8R8A8 *src) in readColor() argument
388 dst->red = src->R; in readColor()
389 dst->green = src->G; in readColor()
390 dst->blue = src->B; in readColor()
391 dst->alpha = src->A; in readColor()
394 void B8G8R8A8::readColor(gl::ColorF *dst, const B8G8R8A8 *src) in readColor() argument
396 dst->red = gl::normalizedToFloat(src->R); in readColor()
397 dst->green = gl::normalizedToFloat(src->G); in readColor()
398 dst->blue = gl::normalizedToFloat(src->B); in readColor()
399 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
402 void B8G8R8A8::writeColor(B8G8R8A8 *dst, const gl::ColorUI *src) in writeColor() argument
404 dst->R = static_cast<uint8_t>(src->red); in writeColor()
405 dst->G = static_cast<uint8_t>(src->green); in writeColor()
406 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
407 dst->A = static_cast<uint8_t>(src->alpha); in writeColor()
410 void B8G8R8A8::writeColor(B8G8R8A8 *dst, const gl::ColorF *src) in writeColor() argument
412 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
413 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
414 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
415 dst->A = gl::floatToNormalized<uint8_t>(src->alpha); in writeColor()
418 void B8G8R8A8::average(B8G8R8A8 *dst, const B8G8R8A8 *src1, const B8G8R8A8 *src2) in average() argument
420 *(uint32_t *)dst = (((*(uint32_t *)src1 ^ *(uint32_t *)src2) & 0xFEFEFEFE) >> 1) + in average()
424 void B8G8R8X8::readColor(gl::ColorUI *dst, const B8G8R8X8 *src) in readColor() argument
426 dst->red = src->R; in readColor()
427 dst->green = src->G; in readColor()
428 dst->blue = src->B; in readColor()
429 dst->alpha = 1; in readColor()
432 void B8G8R8X8::readColor(gl::ColorF *dst, const B8G8R8X8 *src) in readColor() argument
434 dst->red = gl::normalizedToFloat(src->R); in readColor()
435 dst->green = gl::normalizedToFloat(src->G); in readColor()
436 dst->blue = gl::normalizedToFloat(src->B); in readColor()
437 dst->alpha = 1.0f; in readColor()
440 void B8G8R8X8::writeColor(B8G8R8X8 *dst, const gl::ColorUI *src) in writeColor() argument
442 dst->R = static_cast<uint8_t>(src->red); in writeColor()
443 dst->G = static_cast<uint8_t>(src->green); in writeColor()
444 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
445 dst->X = 255; in writeColor()
448 void B8G8R8X8::writeColor(B8G8R8X8 *dst, const gl::ColorF *src) in writeColor() argument
450 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
451 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
452 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
453 dst->X = 255; in writeColor()
456 void B8G8R8X8::average(B8G8R8X8 *dst, const B8G8R8X8 *src1, const B8G8R8X8 *src2) in average() argument
458 *(uint32_t *)dst = (((*(uint32_t *)src1 ^ *(uint32_t *)src2) & 0xFEFEFEFE) >> 1) + in average()
460 dst->X = 255; in average()
463 void R8G8B8X8::readColor(gl::ColorUI *dst, const R8G8B8X8 *src) in readColor() argument
465 dst->red = src->R; in readColor()
466 dst->green = src->G; in readColor()
467 dst->blue = src->B; in readColor()
468 dst->alpha = 1; in readColor()
471 void R8G8B8X8::readColor(gl::ColorF *dst, const R8G8B8X8 *src) in readColor() argument
473 dst->red = gl::normalizedToFloat(src->R); in readColor()
474 dst->green = gl::normalizedToFloat(src->G); in readColor()
475 dst->blue = gl::normalizedToFloat(src->B); in readColor()
476 dst->alpha = 1.0f; in readColor()
479 void R8G8B8X8::writeColor(R8G8B8X8 *dst, const gl::ColorUI *src) in writeColor() argument
481 dst->R = static_cast<uint8_t>(src->red); in writeColor()
482 dst->G = static_cast<uint8_t>(src->green); in writeColor()
483 dst->B = static_cast<uint8_t>(src->blue); in writeColor()
484 dst->X = 255; in writeColor()
487 void R8G8B8X8::writeColor(R8G8B8X8 *dst, const gl::ColorF *src) in writeColor() argument
489 dst->R = gl::floatToNormalized<uint8_t>(src->red); in writeColor()
490 dst->G = gl::floatToNormalized<uint8_t>(src->green); in writeColor()
491 dst->B = gl::floatToNormalized<uint8_t>(src->blue); in writeColor()
492 dst->X = 255; in writeColor()
495 void R8G8B8X8::average(R8G8B8X8 *dst, const R8G8B8X8 *src1, const R8G8B8X8 *src2) in average() argument
497 *(uint32_t *)dst = (((*(uint32_t *)src1 ^ *(uint32_t *)src2) & 0xFEFEFEFE) >> 1) + in average()
499 dst->X = 255; in average()
502 void A1R5G5B5::readColor(gl::ColorF *dst, const A1R5G5B5 *src) in readColor() argument
504 dst->alpha = gl::normalizedToFloat<1>(gl::getShiftedData<1, 15>(src->ARGB)); in readColor()
505 dst->red = gl::normalizedToFloat<5>(gl::getShiftedData<5, 10>(src->ARGB)); in readColor()
506 dst->green = gl::normalizedToFloat<5>(gl::getShiftedData<5, 5>(src->ARGB)); in readColor()
507 dst->blue = gl::normalizedToFloat<5>(gl::getShiftedData<5, 0>(src->ARGB)); in readColor()
510 void A1R5G5B5::writeColor(A1R5G5B5 *dst, const gl::ColorF *src) in writeColor() argument
512 dst->ARGB = gl::shiftData<1, 15>(gl::floatToNormalized<1, uint16_t>(src->alpha)) | in writeColor()
518 void A1R5G5B5::average(A1R5G5B5 *dst, const A1R5G5B5 *src1, const A1R5G5B5 *src2) in average() argument
520 dst->ARGB = gl::shiftData<1, 15>(gl::average(gl::getShiftedData<1, 15>(src1->ARGB), in average()
530 void R5G5B5A1::readColor(gl::ColorF *dst, const R5G5B5A1 *src) in readColor() argument
532 dst->red = gl::normalizedToFloat<5>(gl::getShiftedData<5, 11>(src->RGBA)); in readColor()
533 dst->green = gl::normalizedToFloat<5>(gl::getShiftedData<5, 6>(src->RGBA)); in readColor()
534 dst->blue = gl::normalizedToFloat<5>(gl::getShiftedData<5, 1>(src->RGBA)); in readColor()
535 dst->alpha = gl::normalizedToFloat<1>(gl::getShiftedData<1, 0>(src->RGBA)); in readColor()
538 void R5G5B5A1::writeColor(R5G5B5A1 *dst, const gl::ColorF *src) in writeColor() argument
540 dst->RGBA = gl::shiftData<5, 11>(gl::floatToNormalized<5, uint16_t>(src->red)) | in writeColor()
546 void R5G5B5A1::average(R5G5B5A1 *dst, const R5G5B5A1 *src1, const R5G5B5A1 *src2) in average() argument
548 dst->RGBA = gl::shiftData<5, 11>(gl::average(gl::getShiftedData<5, 11>(src1->RGBA), in average()
558 void R4G4B4A4::readColor(gl::ColorF *dst, const R4G4B4A4 *src) in readColor() argument
560 dst->red = gl::normalizedToFloat<4>(gl::getShiftedData<4, 12>(src->RGBA)); in readColor()
561 dst->green = gl::normalizedToFloat<4>(gl::getShiftedData<4, 8>(src->RGBA)); in readColor()
562 dst->blue = gl::normalizedToFloat<4>(gl::getShiftedData<4, 4>(src->RGBA)); in readColor()
563 dst->alpha = gl::normalizedToFloat<4>(gl::getShiftedData<4, 0>(src->RGBA)); in readColor()
566 void R4G4B4A4::writeColor(R4G4B4A4 *dst, const gl::ColorF *src) in writeColor() argument
568 dst->RGBA = gl::shiftData<4, 12>(gl::floatToNormalized<4, uint16_t>(src->red)) | in writeColor()
574 void R4G4B4A4::average(R4G4B4A4 *dst, const R4G4B4A4 *src1, const R4G4B4A4 *src2) in average() argument
576 dst->RGBA = gl::shiftData<4, 12>(gl::average(gl::getShiftedData<4, 12>(src1->RGBA), in average()
586 void A4R4G4B4::readColor(gl::ColorF *dst, const A4R4G4B4 *src) in readColor() argument
588 dst->alpha = gl::normalizedToFloat<4>(gl::getShiftedData<4, 12>(src->ARGB)); in readColor()
589 dst->red = gl::normalizedToFloat<4>(gl::getShiftedData<4, 8>(src->ARGB)); in readColor()
590 dst->green = gl::normalizedToFloat<4>(gl::getShiftedData<4, 4>(src->ARGB)); in readColor()
591 dst->blue = gl::normalizedToFloat<4>(gl::getShiftedData<4, 0>(src->ARGB)); in readColor()
594 void A4R4G4B4::writeColor(A4R4G4B4 *dst, const gl::ColorF *src) in writeColor() argument
596 dst->ARGB = gl::shiftData<4, 12>(gl::floatToNormalized<4, uint16_t>(src->alpha)) | in writeColor()
602 void A4R4G4B4::average(A4R4G4B4 *dst, const A4R4G4B4 *src1, const A4R4G4B4 *src2) in average() argument
604 dst->ARGB = gl::shiftData<4, 12>(gl::average(gl::getShiftedData<4, 12>(src1->ARGB), in average()
614 void R16::readColor(gl::ColorUI *dst, const R16 *src) in readColor() argument
616 dst->red = src->R; in readColor()
617 dst->green = 0; in readColor()
618 dst->blue = 0; in readColor()
619 dst->alpha = 1; in readColor()
622 void R16::readColor(gl::ColorF *dst, const R16 *src) in readColor() argument
624 dst->red = gl::normalizedToFloat(src->R); in readColor()
625 dst->green = 0.0f; in readColor()
626 dst->blue = 0.0f; in readColor()
627 dst->alpha = 1.0f; in readColor()
630 void R16::writeColor(R16 *dst, const gl::ColorUI *src) in writeColor() argument
632 dst->R = static_cast<uint16_t>(src->red); in writeColor()
635 void R16::writeColor(R16 *dst, const gl::ColorF *src) in writeColor() argument
637 dst->R = gl::floatToNormalized<uint16_t>(src->red); in writeColor()
640 void R16::average(R16 *dst, const R16 *src1, const R16 *src2) in average() argument
642 dst->R = gl::average(src1->R, src2->R); in average()
645 void R16G16::readColor(gl::ColorUI *dst, const R16G16 *src) in readColor() argument
647 dst->red = src->R; in readColor()
648 dst->green = src->G; in readColor()
649 dst->blue = 0; in readColor()
650 dst->alpha = 1; in readColor()
653 void R16G16::readColor(gl::ColorF *dst, const R16G16 *src) in readColor() argument
655 dst->red = gl::normalizedToFloat(src->R); in readColor()
656 dst->green = gl::normalizedToFloat(src->G); in readColor()
657 dst->blue = 0.0f; in readColor()
658 dst->alpha = 1.0f; in readColor()
661 void R16G16::writeColor(R16G16 *dst, const gl::ColorUI *src) in writeColor() argument
663 dst->R = static_cast<uint16_t>(src->red); in writeColor()
664 dst->G = static_cast<uint16_t>(src->green); in writeColor()
667 void R16G16::writeColor(R16G16 *dst, const gl::ColorF *src) in writeColor() argument
669 dst->R = gl::floatToNormalized<uint16_t>(src->red); in writeColor()
670 dst->G = gl::floatToNormalized<uint16_t>(src->green); in writeColor()
673 void R16G16::average(R16G16 *dst, const R16G16 *src1, const R16G16 *src2) in average() argument
675 dst->R = gl::average(src1->R, src2->R); in average()
676 dst->G = gl::average(src1->G, src2->G); in average()
679 void R16G16B16::readColor(gl::ColorUI *dst, const R16G16B16 *src) in readColor() argument
681 dst->red = src->R; in readColor()
682 dst->green = src->G; in readColor()
683 dst->blue = src->B; in readColor()
684 dst->alpha = 1; in readColor()
687 void R16G16B16::readColor(gl::ColorF *dst, const R16G16B16 *src) in readColor() argument
689 dst->red = gl::normalizedToFloat(src->R); in readColor()
690 dst->green = gl::normalizedToFloat(src->G); in readColor()
691 dst->blue = gl::normalizedToFloat(src->B); in readColor()
692 dst->alpha = 1.0f; in readColor()
695 void R16G16B16::writeColor(R16G16B16 *dst, const gl::ColorUI *src) in writeColor() argument
697 dst->R = static_cast<uint16_t>(src->red); in writeColor()
698 dst->G = static_cast<uint16_t>(src->green); in writeColor()
699 dst->B = static_cast<uint16_t>(src->blue); in writeColor()
702 void R16G16B16::writeColor(R16G16B16 *dst, const gl::ColorF *src) in writeColor() argument
704 dst->R = gl::floatToNormalized<uint16_t>(src->red); in writeColor()
705 dst->G = gl::floatToNormalized<uint16_t>(src->green); in writeColor()
706 dst->B = gl::floatToNormalized<uint16_t>(src->blue); in writeColor()
709 void R16G16B16::average(R16G16B16 *dst, const R16G16B16 *src1, const R16G16B16 *src2) in average() argument
711 dst->R = gl::average(src1->R, src2->R); in average()
712 dst->G = gl::average(src1->G, src2->G); in average()
713 dst->B = gl::average(src1->B, src2->B); in average()
716 void R16G16B16A16::readColor(gl::ColorUI *dst, const R16G16B16A16 *src) in readColor() argument
718 dst->red = src->R; in readColor()
719 dst->green = src->G; in readColor()
720 dst->blue = src->B; in readColor()
721 dst->alpha = src->A; in readColor()
724 void R16G16B16A16::readColor(gl::ColorF *dst, const R16G16B16A16 *src) in readColor() argument
726 dst->red = gl::normalizedToFloat(src->R); in readColor()
727 dst->green = gl::normalizedToFloat(src->G); in readColor()
728 dst->blue = gl::normalizedToFloat(src->B); in readColor()
729 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
732 void R16G16B16A16::writeColor(R16G16B16A16 *dst, const gl::ColorUI *src) in writeColor() argument
734 dst->R = static_cast<uint16_t>(src->red); in writeColor()
735 dst->G = static_cast<uint16_t>(src->green); in writeColor()
736 dst->B = static_cast<uint16_t>(src->blue); in writeColor()
737 dst->A = static_cast<uint16_t>(src->alpha); in writeColor()
740 void R16G16B16A16::writeColor(R16G16B16A16 *dst, const gl::ColorF *src) in writeColor() argument
742 dst->R = gl::floatToNormalized<uint16_t>(src->red); in writeColor()
743 dst->G = gl::floatToNormalized<uint16_t>(src->green); in writeColor()
744 dst->B = gl::floatToNormalized<uint16_t>(src->blue); in writeColor()
745 dst->A = gl::floatToNormalized<uint16_t>(src->alpha); in writeColor()
748 void R16G16B16A16::average(R16G16B16A16 *dst, const R16G16B16A16 *src1, const R16G16B16A16 *src2) in average() argument
750 dst->R = gl::average(src1->R, src2->R); in average()
751 dst->G = gl::average(src1->G, src2->G); in average()
752 dst->B = gl::average(src1->B, src2->B); in average()
753 dst->A = gl::average(src1->A, src2->A); in average()
756 void R32::readColor(gl::ColorUI *dst, const R32 *src) in readColor() argument
758 dst->red = src->R; in readColor()
759 dst->green = 0; in readColor()
760 dst->blue = 0; in readColor()
761 dst->alpha = 1; in readColor()
764 void R32::readColor(gl::ColorF *dst, const R32 *src) in readColor() argument
766 dst->red = gl::normalizedToFloat(src->R); in readColor()
767 dst->green = 0.0f; in readColor()
768 dst->blue = 0.0f; in readColor()
769 dst->alpha = 1.0f; in readColor()
772 void R32::writeColor(R32 *dst, const gl::ColorUI *src) in writeColor() argument
774 dst->R = static_cast<uint32_t>(src->red); in writeColor()
777 void R32::writeColor(R32 *dst, const gl::ColorF *src) in writeColor() argument
779 dst->R = gl::floatToNormalized<uint32_t>(src->red); in writeColor()
782 void R32::average(R32 *dst, const R32 *src1, const R32 *src2) in average() argument
784 dst->R = gl::average(src1->R, src2->R); in average()
787 void R32G32::readColor(gl::ColorUI *dst, const R32G32 *src) in readColor() argument
789 dst->red = src->R; in readColor()
790 dst->green = src->G; in readColor()
791 dst->blue = 0; in readColor()
792 dst->alpha = 1; in readColor()
795 void R32G32::readColor(gl::ColorF *dst, const R32G32 *src) in readColor() argument
797 dst->red = gl::normalizedToFloat(src->R); in readColor()
798 dst->green = gl::normalizedToFloat(src->G); in readColor()
799 dst->blue = 0.0f; in readColor()
800 dst->alpha = 1.0f; in readColor()
803 void R32G32::writeColor(R32G32 *dst, const gl::ColorUI *src) in writeColor() argument
805 dst->R = static_cast<uint32_t>(src->red); in writeColor()
806 dst->G = static_cast<uint32_t>(src->green); in writeColor()
809 void R32G32::writeColor(R32G32 *dst, const gl::ColorF *src) in writeColor() argument
811 dst->R = gl::floatToNormalized<uint32_t>(src->red); in writeColor()
812 dst->G = gl::floatToNormalized<uint32_t>(src->green); in writeColor()
815 void R32G32::average(R32G32 *dst, const R32G32 *src1, const R32G32 *src2) in average() argument
817 dst->R = gl::average(src1->R, src2->R); in average()
818 dst->G = gl::average(src1->G, src2->G); in average()
821 void R32G32B32::readColor(gl::ColorUI *dst, const R32G32B32 *src) in readColor() argument
823 dst->red = src->R; in readColor()
824 dst->green = src->G; in readColor()
825 dst->blue = src->B; in readColor()
826 dst->alpha = 1; in readColor()
829 void R32G32B32::readColor(gl::ColorF *dst, const R32G32B32 *src) in readColor() argument
831 dst->red = gl::normalizedToFloat(src->R); in readColor()
832 dst->green = gl::normalizedToFloat(src->G); in readColor()
833 dst->blue = gl::normalizedToFloat(src->B); in readColor()
834 dst->alpha = 1.0f; in readColor()
837 void R32G32B32::writeColor(R32G32B32 *dst, const gl::ColorUI *src) in writeColor() argument
839 dst->R = static_cast<uint32_t>(src->red); in writeColor()
840 dst->G = static_cast<uint32_t>(src->green); in writeColor()
841 dst->B = static_cast<uint32_t>(src->blue); in writeColor()
844 void R32G32B32::writeColor(R32G32B32 *dst, const gl::ColorF *src) in writeColor() argument
846 dst->R = gl::floatToNormalized<uint32_t>(src->red); in writeColor()
847 dst->G = gl::floatToNormalized<uint32_t>(src->green); in writeColor()
848 dst->B = gl::floatToNormalized<uint32_t>(src->blue); in writeColor()
851 void R32G32B32::average(R32G32B32 *dst, const R32G32B32 *src1, const R32G32B32 *src2) in average() argument
853 dst->R = gl::average(src1->R, src2->R); in average()
854 dst->G = gl::average(src1->G, src2->G); in average()
855 dst->B = gl::average(src1->B, src2->B); in average()
858 void R32G32B32A32::readColor(gl::ColorUI *dst, const R32G32B32A32 *src) in readColor() argument
860 dst->red = src->R; in readColor()
861 dst->green = src->G; in readColor()
862 dst->blue = src->B; in readColor()
863 dst->alpha = src->A; in readColor()
866 void R32G32B32A32::readColor(gl::ColorF *dst, const R32G32B32A32 *src) in readColor() argument
868 dst->red = gl::normalizedToFloat(src->R); in readColor()
869 dst->green = gl::normalizedToFloat(src->G); in readColor()
870 dst->blue = gl::normalizedToFloat(src->B); in readColor()
871 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
874 void R32G32B32A32::writeColor(R32G32B32A32 *dst, const gl::ColorUI *src) in writeColor() argument
876 dst->R = static_cast<uint32_t>(src->red); in writeColor()
877 dst->G = static_cast<uint32_t>(src->green); in writeColor()
878 dst->B = static_cast<uint32_t>(src->blue); in writeColor()
879 dst->A = static_cast<uint32_t>(src->alpha); in writeColor()
882 void R32G32B32A32::writeColor(R32G32B32A32 *dst, const gl::ColorF *src) in writeColor() argument
884 dst->R = gl::floatToNormalized<uint32_t>(src->red); in writeColor()
885 dst->G = gl::floatToNormalized<uint32_t>(src->green); in writeColor()
886 dst->B = gl::floatToNormalized<uint32_t>(src->blue); in writeColor()
887 dst->A = gl::floatToNormalized<uint32_t>(src->alpha); in writeColor()
890 void R32G32B32A32::average(R32G32B32A32 *dst, const R32G32B32A32 *src1, const R32G32B32A32 *src2) in average() argument
892 dst->R = gl::average(src1->R, src2->R); in average()
893 dst->G = gl::average(src1->G, src2->G); in average()
894 dst->B = gl::average(src1->B, src2->B); in average()
895 dst->A = gl::average(src1->A, src2->A); in average()
898 void R8S::readColor(gl::ColorI *dst, const R8S *src) in readColor() argument
900 dst->red = src->R; in readColor()
901 dst->green = 0; in readColor()
902 dst->blue = 0; in readColor()
903 dst->alpha = 1; in readColor()
906 void R8S::readColor(gl::ColorF *dst, const R8S *src) in readColor() argument
908 dst->red = gl::normalizedToFloat(src->R); in readColor()
909 dst->green = 0.0f; in readColor()
910 dst->blue = 0.0f; in readColor()
911 dst->alpha = 1.0f; in readColor()
914 void R8S::writeColor(R8S *dst, const gl::ColorI *src) in writeColor() argument
916 dst->R = static_cast<int8_t>(src->red); in writeColor()
919 void R8S::writeColor(R8S *dst, const gl::ColorF *src) in writeColor() argument
921 dst->R = gl::floatToNormalized<int8_t>(src->red); in writeColor()
924 void R8S::average(R8S *dst, const R8S *src1, const R8S *src2) in average() argument
926 dst->R = static_cast<int8_t>(gl::average(src1->R, src2->R)); in average()
929 void R8G8S::readColor(gl::ColorI *dst, const R8G8S *src) in readColor() argument
931 dst->red = src->R; in readColor()
932 dst->green = src->G; in readColor()
933 dst->blue = 0; in readColor()
934 dst->alpha = 1; in readColor()
937 void R8G8S::readColor(gl::ColorF *dst, const R8G8S *src) in readColor() argument
939 dst->red = gl::normalizedToFloat(src->R); in readColor()
940 dst->green = gl::normalizedToFloat(src->G); in readColor()
941 dst->blue = 0.0f; in readColor()
942 dst->alpha = 1.0f; in readColor()
945 void R8G8S::writeColor(R8G8S *dst, const gl::ColorI *src) in writeColor() argument
947 dst->R = static_cast<int8_t>(src->red); in writeColor()
948 dst->G = static_cast<int8_t>(src->green); in writeColor()
951 void R8G8S::writeColor(R8G8S *dst, const gl::ColorF *src) in writeColor() argument
953 dst->R = gl::floatToNormalized<int8_t>(src->red); in writeColor()
954 dst->G = gl::floatToNormalized<int8_t>(src->green); in writeColor()
957 void R8G8S::average(R8G8S *dst, const R8G8S *src1, const R8G8S *src2) in average() argument
959 dst->R = static_cast<int8_t>(gl::average(src1->R, src2->R)); in average()
960 dst->G = static_cast<int8_t>(gl::average(src1->G, src2->G)); in average()
963 void R8G8B8S::readColor(gl::ColorI *dst, const R8G8B8S *src) in readColor() argument
965 dst->red = src->R; in readColor()
966 dst->green = src->G; in readColor()
967 dst->blue = src->B; in readColor()
968 dst->alpha = 1; in readColor()
971 void R8G8B8S::readColor(gl::ColorF *dst, const R8G8B8S *src) in readColor() argument
973 dst->red = gl::normalizedToFloat(src->R); in readColor()
974 dst->green = gl::normalizedToFloat(src->G); in readColor()
975 dst->blue = gl::normalizedToFloat(src->B); in readColor()
976 dst->alpha = 1.0f; in readColor()
979 void R8G8B8S::writeColor(R8G8B8S *dst, const gl::ColorI *src) in writeColor() argument
981 dst->R = static_cast<int8_t>(src->red); in writeColor()
982 dst->G = static_cast<int8_t>(src->green); in writeColor()
983 dst->B = static_cast<int8_t>(src->blue); in writeColor()
986 void R8G8B8S::writeColor(R8G8B8S *dst, const gl::ColorF *src) in writeColor() argument
988 dst->R = gl::floatToNormalized<int8_t>(src->red); in writeColor()
989 dst->G = gl::floatToNormalized<int8_t>(src->green); in writeColor()
990 dst->B = gl::floatToNormalized<int8_t>(src->blue); in writeColor()
993 void R8G8B8S::average(R8G8B8S *dst, const R8G8B8S *src1, const R8G8B8S *src2) in average() argument
995 dst->R = static_cast<int8_t>(gl::average(src1->R, src2->R)); in average()
996 dst->G = static_cast<int8_t>(gl::average(src1->G, src2->G)); in average()
997 dst->B = static_cast<int8_t>(gl::average(src1->B, src2->B)); in average()
1000 void R8G8B8A8S::readColor(gl::ColorI *dst, const R8G8B8A8S *src) in readColor() argument
1002 dst->red = src->R; in readColor()
1003 dst->green = src->G; in readColor()
1004 dst->blue = src->B; in readColor()
1005 dst->alpha = src->A; in readColor()
1008 void R8G8B8A8S::readColor(gl::ColorF *dst, const R8G8B8A8S *src) in readColor() argument
1010 dst->red = gl::normalizedToFloat(src->R); in readColor()
1011 dst->green = gl::normalizedToFloat(src->G); in readColor()
1012 dst->blue = gl::normalizedToFloat(src->B); in readColor()
1013 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
1016 void R8G8B8A8S::writeColor(R8G8B8A8S *dst, const gl::ColorI *src) in writeColor() argument
1018 dst->R = static_cast<int8_t>(src->red); in writeColor()
1019 dst->G = static_cast<int8_t>(src->green); in writeColor()
1020 dst->B = static_cast<int8_t>(src->blue); in writeColor()
1021 dst->A = static_cast<int8_t>(src->alpha); in writeColor()
1024 void R8G8B8A8S::writeColor(R8G8B8A8S *dst, const gl::ColorF *src) in writeColor() argument
1026 dst->R = gl::floatToNormalized<int8_t>(src->red); in writeColor()
1027 dst->G = gl::floatToNormalized<int8_t>(src->green); in writeColor()
1028 dst->B = gl::floatToNormalized<int8_t>(src->blue); in writeColor()
1029 dst->A = gl::floatToNormalized<int8_t>(src->alpha); in writeColor()
1032 void R8G8B8A8S::average(R8G8B8A8S *dst, const R8G8B8A8S *src1, const R8G8B8A8S *src2) in average() argument
1034 dst->R = static_cast<int8_t>(gl::average(src1->R, src2->R)); in average()
1035 dst->G = static_cast<int8_t>(gl::average(src1->G, src2->G)); in average()
1036 dst->B = static_cast<int8_t>(gl::average(src1->B, src2->B)); in average()
1037 dst->A = static_cast<int8_t>(gl::average(src1->A, src2->A)); in average()
1040 void R16S::readColor(gl::ColorI *dst, const R16S *src) in readColor() argument
1042 dst->red = src->R; in readColor()
1043 dst->green = 0; in readColor()
1044 dst->blue = 0; in readColor()
1045 dst->alpha = 1; in readColor()
1048 void R16S::readColor(gl::ColorF *dst, const R16S *src) in readColor() argument
1050 dst->red = gl::normalizedToFloat(src->R); in readColor()
1051 dst->green = 0.0f; in readColor()
1052 dst->blue = 0.0f; in readColor()
1053 dst->alpha = 1.0f; in readColor()
1056 void R16S::writeColor(R16S *dst, const gl::ColorI *src) in writeColor() argument
1058 dst->R = static_cast<int16_t>(src->red); in writeColor()
1061 void R16S::writeColor(R16S *dst, const gl::ColorF *src) in writeColor() argument
1063 dst->R = gl::floatToNormalized<int16_t>(src->red); in writeColor()
1066 void R16S::average(R16S *dst, const R16S *src1, const R16S *src2) in average() argument
1068 dst->R = gl::average(src1->R, src2->R); in average()
1071 void R16G16S::readColor(gl::ColorI *dst, const R16G16S *src) in readColor() argument
1073 dst->red = src->R; in readColor()
1074 dst->green = src->G; in readColor()
1075 dst->blue = 0; in readColor()
1076 dst->alpha = 1; in readColor()
1079 void R16G16S::readColor(gl::ColorF *dst, const R16G16S *src) in readColor() argument
1081 dst->red = gl::normalizedToFloat(src->R); in readColor()
1082 dst->green = gl::normalizedToFloat(src->G); in readColor()
1083 dst->blue = 0.0f; in readColor()
1084 dst->alpha = 1.0f; in readColor()
1087 void R16G16S::writeColor(R16G16S *dst, const gl::ColorI *src) in writeColor() argument
1089 dst->R = static_cast<int16_t>(src->red); in writeColor()
1090 dst->G = static_cast<int16_t>(src->green); in writeColor()
1093 void R16G16S::writeColor(R16G16S *dst, const gl::ColorF *src) in writeColor() argument
1095 dst->R = gl::floatToNormalized<int16_t>(src->red); in writeColor()
1096 dst->G = gl::floatToNormalized<int16_t>(src->green); in writeColor()
1099 void R16G16S::average(R16G16S *dst, const R16G16S *src1, const R16G16S *src2) in average() argument
1101 dst->R = gl::average(src1->R, src2->R); in average()
1102 dst->G = gl::average(src1->G, src2->G); in average()
1105 void R16G16B16S::readColor(gl::ColorI *dst, const R16G16B16S *src) in readColor() argument
1107 dst->red = src->R; in readColor()
1108 dst->green = src->G; in readColor()
1109 dst->blue = src->B; in readColor()
1110 dst->alpha = 1; in readColor()
1113 void R16G16B16S::readColor(gl::ColorF *dst, const R16G16B16S *src) in readColor() argument
1115 dst->red = gl::normalizedToFloat(src->R); in readColor()
1116 dst->green = gl::normalizedToFloat(src->G); in readColor()
1117 dst->blue = gl::normalizedToFloat(src->B); in readColor()
1118 dst->alpha = 1.0f; in readColor()
1121 void R16G16B16S::writeColor(R16G16B16S *dst, const gl::ColorI *src) in writeColor() argument
1123 dst->R = static_cast<int16_t>(src->red); in writeColor()
1124 dst->G = static_cast<int16_t>(src->green); in writeColor()
1125 dst->B = static_cast<int16_t>(src->blue); in writeColor()
1128 void R16G16B16S::writeColor(R16G16B16S *dst, const gl::ColorF *src) in writeColor() argument
1130 dst->R = gl::floatToNormalized<int16_t>(src->red); in writeColor()
1131 dst->G = gl::floatToNormalized<int16_t>(src->green); in writeColor()
1132 dst->B = gl::floatToNormalized<int16_t>(src->blue); in writeColor()
1135 void R16G16B16S::average(R16G16B16S *dst, const R16G16B16S *src1, const R16G16B16S *src2) in average() argument
1137 dst->R = gl::average(src1->R, src2->R); in average()
1138 dst->G = gl::average(src1->G, src2->G); in average()
1139 dst->B = gl::average(src1->B, src2->B); in average()
1142 void R16G16B16A16S::readColor(gl::ColorI *dst, const R16G16B16A16S *src) in readColor() argument
1144 dst->red = src->R; in readColor()
1145 dst->green = src->G; in readColor()
1146 dst->blue = src->B; in readColor()
1147 dst->alpha = src->A; in readColor()
1150 void R16G16B16A16S::readColor(gl::ColorF *dst, const R16G16B16A16S *src) in readColor() argument
1152 dst->red = gl::normalizedToFloat(src->R); in readColor()
1153 dst->green = gl::normalizedToFloat(src->G); in readColor()
1154 dst->blue = gl::normalizedToFloat(src->B); in readColor()
1155 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
1158 void R16G16B16A16S::writeColor(R16G16B16A16S *dst, const gl::ColorI *src) in writeColor() argument
1160 dst->R = static_cast<int16_t>(src->red); in writeColor()
1161 dst->G = static_cast<int16_t>(src->green); in writeColor()
1162 dst->B = static_cast<int16_t>(src->blue); in writeColor()
1163 dst->A = static_cast<int16_t>(src->alpha); in writeColor()
1166 void R16G16B16A16S::writeColor(R16G16B16A16S *dst, const gl::ColorF *src) in writeColor() argument
1168 dst->R = gl::floatToNormalized<int16_t>(src->red); in writeColor()
1169 dst->G = gl::floatToNormalized<int16_t>(src->green); in writeColor()
1170 dst->B = gl::floatToNormalized<int16_t>(src->blue); in writeColor()
1171 dst->A = gl::floatToNormalized<int16_t>(src->alpha); in writeColor()
1174 void R16G16B16A16S::average(R16G16B16A16S *dst, in average() argument
1178 dst->R = gl::average(src1->R, src2->R); in average()
1179 dst->G = gl::average(src1->G, src2->G); in average()
1180 dst->B = gl::average(src1->B, src2->B); in average()
1181 dst->A = gl::average(src1->A, src2->A); in average()
1184 void R32S::readColor(gl::ColorI *dst, const R32S *src) in readColor() argument
1186 dst->red = src->R; in readColor()
1187 dst->green = 0; in readColor()
1188 dst->blue = 0; in readColor()
1189 dst->alpha = 1; in readColor()
1192 void R32S::readColor(gl::ColorF *dst, const R32S *src) in readColor() argument
1194 dst->red = gl::normalizedToFloat(src->R); in readColor()
1195 dst->green = 0.0f; in readColor()
1196 dst->blue = 0.0f; in readColor()
1197 dst->alpha = 1.0f; in readColor()
1200 void R32S::writeColor(R32S *dst, const gl::ColorI *src) in writeColor() argument
1202 dst->R = static_cast<int32_t>(src->red); in writeColor()
1205 void R32S::writeColor(R32S *dst, const gl::ColorF *src) in writeColor() argument
1207 dst->R = gl::floatToNormalized<int32_t>(src->red); in writeColor()
1210 void R32S::average(R32S *dst, const R32S *src1, const R32S *src2) in average() argument
1212 dst->R = gl::average(src1->R, src2->R); in average()
1215 void R32G32S::readColor(gl::ColorI *dst, const R32G32S *src) in readColor() argument
1217 dst->red = src->R; in readColor()
1218 dst->green = src->G; in readColor()
1219 dst->blue = 0; in readColor()
1220 dst->alpha = 1; in readColor()
1223 void R32G32S::readColor(gl::ColorF *dst, const R32G32S *src) in readColor() argument
1225 dst->red = gl::normalizedToFloat(src->R); in readColor()
1226 dst->green = gl::normalizedToFloat(src->G); in readColor()
1227 dst->blue = 0.0f; in readColor()
1228 dst->alpha = 1.0f; in readColor()
1231 void R32G32S::writeColor(R32G32S *dst, const gl::ColorI *src) in writeColor() argument
1233 dst->R = static_cast<int32_t>(src->red); in writeColor()
1234 dst->G = static_cast<int32_t>(src->green); in writeColor()
1237 void R32G32S::writeColor(R32G32S *dst, const gl::ColorF *src) in writeColor() argument
1239 dst->R = gl::floatToNormalized<int32_t>(src->red); in writeColor()
1240 dst->G = gl::floatToNormalized<int32_t>(src->green); in writeColor()
1243 void R32G32S::average(R32G32S *dst, const R32G32S *src1, const R32G32S *src2) in average() argument
1245 dst->R = gl::average(src1->R, src2->R); in average()
1246 dst->G = gl::average(src1->G, src2->G); in average()
1249 void R32G32B32S::readColor(gl::ColorI *dst, const R32G32B32S *src) in readColor() argument
1251 dst->red = src->R; in readColor()
1252 dst->green = src->G; in readColor()
1253 dst->blue = src->B; in readColor()
1254 dst->alpha = 1; in readColor()
1257 void R32G32B32S::readColor(gl::ColorF *dst, const R32G32B32S *src) in readColor() argument
1259 dst->red = gl::normalizedToFloat(src->R); in readColor()
1260 dst->green = gl::normalizedToFloat(src->G); in readColor()
1261 dst->blue = gl::normalizedToFloat(src->B); in readColor()
1262 dst->alpha = 1.0f; in readColor()
1265 void R32G32B32S::writeColor(R32G32B32S *dst, const gl::ColorI *src) in writeColor() argument
1267 dst->R = static_cast<int32_t>(src->red); in writeColor()
1268 dst->G = static_cast<int32_t>(src->green); in writeColor()
1269 dst->B = static_cast<int32_t>(src->blue); in writeColor()
1272 void R32G32B32S::writeColor(R32G32B32S *dst, const gl::ColorF *src) in writeColor() argument
1274 dst->R = gl::floatToNormalized<int32_t>(src->red); in writeColor()
1275 dst->G = gl::floatToNormalized<int32_t>(src->green); in writeColor()
1276 dst->B = gl::floatToNormalized<int32_t>(src->blue); in writeColor()
1279 void R32G32B32S::average(R32G32B32S *dst, const R32G32B32S *src1, const R32G32B32S *src2) in average() argument
1281 dst->R = gl::average(src1->R, src2->R); in average()
1282 dst->G = gl::average(src1->G, src2->G); in average()
1283 dst->B = gl::average(src1->B, src2->B); in average()
1286 void R32G32B32A32S::readColor(gl::ColorI *dst, const R32G32B32A32S *src) in readColor() argument
1288 dst->red = src->R; in readColor()
1289 dst->green = src->G; in readColor()
1290 dst->blue = src->B; in readColor()
1291 dst->alpha = src->A; in readColor()
1294 void R32G32B32A32S::readColor(gl::ColorF *dst, const R32G32B32A32S *src) in readColor() argument
1296 dst->red = gl::normalizedToFloat(src->R); in readColor()
1297 dst->green = gl::normalizedToFloat(src->G); in readColor()
1298 dst->blue = gl::normalizedToFloat(src->B); in readColor()
1299 dst->alpha = gl::normalizedToFloat(src->A); in readColor()
1302 void R32G32B32A32S::writeColor(R32G32B32A32S *dst, const gl::ColorI *src) in writeColor() argument
1304 dst->R = static_cast<int32_t>(src->red); in writeColor()
1305 dst->G = static_cast<int32_t>(src->green); in writeColor()
1306 dst->B = static_cast<int32_t>(src->blue); in writeColor()
1307 dst->A = static_cast<int32_t>(src->alpha); in writeColor()
1310 void R32G32B32A32S::writeColor(R32G32B32A32S *dst, const gl::ColorF *src) in writeColor() argument
1312 dst->R = gl::floatToNormalized<int32_t>(src->red); in writeColor()
1313 dst->G = gl::floatToNormalized<int32_t>(src->green); in writeColor()
1314 dst->B = gl::floatToNormalized<int32_t>(src->blue); in writeColor()
1315 dst->A = gl::floatToNormalized<int32_t>(src->alpha); in writeColor()
1318 void R32G32B32A32S::average(R32G32B32A32S *dst, in average() argument
1322 dst->R = gl::average(src1->R, src2->R); in average()
1323 dst->G = gl::average(src1->G, src2->G); in average()
1324 dst->B = gl::average(src1->B, src2->B); in average()
1325 dst->A = gl::average(src1->A, src2->A); in average()
1328 void A16B16G16R16F::readColor(gl::ColorF *dst, const A16B16G16R16F *src) in readColor() argument
1330 dst->red = gl::float16ToFloat32(src->R); in readColor()
1331 dst->green = gl::float16ToFloat32(src->G); in readColor()
1332 dst->blue = gl::float16ToFloat32(src->B); in readColor()
1333 dst->alpha = gl::float16ToFloat32(src->A); in readColor()
1336 void A16B16G16R16F::writeColor(A16B16G16R16F *dst, const gl::ColorF *src) in writeColor() argument
1338 dst->R = gl::float32ToFloat16(src->red); in writeColor()
1339 dst->G = gl::float32ToFloat16(src->green); in writeColor()
1340 dst->B = gl::float32ToFloat16(src->blue); in writeColor()
1341 dst->A = gl::float32ToFloat16(src->alpha); in writeColor()
1344 void A16B16G16R16F::average(A16B16G16R16F *dst, in average() argument
1348 dst->R = gl::averageHalfFloat(src1->R, src2->R); in average()
1349 dst->G = gl::averageHalfFloat(src1->G, src2->G); in average()
1350 dst->B = gl::averageHalfFloat(src1->B, src2->B); in average()
1351 dst->A = gl::averageHalfFloat(src1->A, src2->A); in average()
1354 void R16G16B16A16F::readColor(gl::ColorF *dst, const R16G16B16A16F *src) in readColor() argument
1356 dst->red = gl::float16ToFloat32(src->R); in readColor()
1357 dst->green = gl::float16ToFloat32(src->G); in readColor()
1358 dst->blue = gl::float16ToFloat32(src->B); in readColor()
1359 dst->alpha = gl::float16ToFloat32(src->A); in readColor()
1362 void R16G16B16A16F::writeColor(R16G16B16A16F *dst, const gl::ColorF *src) in writeColor() argument
1364 dst->R = gl::float32ToFloat16(src->red); in writeColor()
1365 dst->G = gl::float32ToFloat16(src->green); in writeColor()
1366 dst->B = gl::float32ToFloat16(src->blue); in writeColor()
1367 dst->A = gl::float32ToFloat16(src->alpha); in writeColor()
1370 void R16G16B16A16F::average(R16G16B16A16F *dst, in average() argument
1374 dst->R = gl::averageHalfFloat(src1->R, src2->R); in average()
1375 dst->G = gl::averageHalfFloat(src1->G, src2->G); in average()
1376 dst->B = gl::averageHalfFloat(src1->B, src2->B); in average()
1377 dst->A = gl::averageHalfFloat(src1->A, src2->A); in average()
1380 void R16F::readColor(gl::ColorF *dst, const R16F *src) in readColor() argument
1382 dst->red = gl::float16ToFloat32(src->R); in readColor()
1383 dst->green = 0.0f; in readColor()
1384 dst->blue = 0.0f; in readColor()
1385 dst->alpha = 1.0f; in readColor()
1388 void R16F::writeColor(R16F *dst, const gl::ColorF *src) in writeColor() argument
1390 dst->R = gl::float32ToFloat16(src->red); in writeColor()
1393 void R16F::average(R16F *dst, const R16F *src1, const R16F *src2) in average() argument
1395 dst->R = gl::averageHalfFloat(src1->R, src2->R); in average()
1398 void A16F::readColor(gl::ColorF *dst, const A16F *src) in readColor() argument
1400 dst->red = 0.0f; in readColor()
1401 dst->green = 0.0f; in readColor()
1402 dst->blue = 0.0f; in readColor()
1403 dst->alpha = gl::float16ToFloat32(src->A); in readColor()
1406 void A16F::writeColor(A16F *dst, const gl::ColorF *src) in writeColor() argument
1408 dst->A = gl::float32ToFloat16(src->alpha); in writeColor()
1411 void A16F::average(A16F *dst, const A16F *src1, const A16F *src2) in average() argument
1413 dst->A = gl::averageHalfFloat(src1->A, src2->A); in average()
1416 void L16F::readColor(gl::ColorF *dst, const L16F *src) in readColor() argument
1419 dst->red = lum; in readColor()
1420 dst->green = lum; in readColor()
1421 dst->blue = lum; in readColor()
1422 dst->alpha = 1.0f; in readColor()
1425 void L16F::writeColor(L16F *dst, const gl::ColorF *src) in writeColor() argument
1427 dst->L = gl::float32ToFloat16(src->red); in writeColor()
1430 void L16F::average(L16F *dst, const L16F *src1, const L16F *src2) in average() argument
1432 dst->L = gl::averageHalfFloat(src1->L, src2->L); in average()
1435 void L16A16F::readColor(gl::ColorF *dst, const L16A16F *src) in readColor() argument
1438 dst->red = lum; in readColor()
1439 dst->green = lum; in readColor()
1440 dst->blue = lum; in readColor()
1441 dst->alpha = gl::float16ToFloat32(src->A); in readColor()
1444 void L16A16F::writeColor(L16A16F *dst, const gl::ColorF *src) in writeColor() argument
1446 dst->L = gl::float32ToFloat16(src->red); in writeColor()
1447 dst->A = gl::float32ToFloat16(src->alpha); in writeColor()
1450 void L16A16F::average(L16A16F *dst, const L16A16F *src1, const L16A16F *src2) in average() argument
1452 dst->L = gl::averageHalfFloat(src1->L, src2->L); in average()
1453 dst->A = gl::averageHalfFloat(src1->A, src2->A); in average()
1456 void R16G16F::readColor(gl::ColorF *dst, const R16G16F *src) in readColor() argument
1458 dst->red = gl::float16ToFloat32(src->R); in readColor()
1459 dst->green = gl::float16ToFloat32(src->G); in readColor()
1460 dst->blue = 0.0f; in readColor()
1461 dst->alpha = 1.0f; in readColor()
1464 void R16G16F::writeColor(R16G16F *dst, const gl::ColorF *src) in writeColor() argument
1466 dst->R = gl::float32ToFloat16(src->red); in writeColor()
1467 dst->G = gl::float32ToFloat16(src->green); in writeColor()
1470 void R16G16F::average(R16G16F *dst, const R16G16F *src1, const R16G16F *src2) in average() argument
1472 dst->R = gl::averageHalfFloat(src1->R, src2->R); in average()
1473 dst->G = gl::averageHalfFloat(src1->G, src2->G); in average()
1476 void R16G16B16F::readColor(gl::ColorF *dst, const R16G16B16F *src) in readColor() argument
1478 dst->red = gl::float16ToFloat32(src->R); in readColor()
1479 dst->green = gl::float16ToFloat32(src->G); in readColor()
1480 dst->blue = gl::float16ToFloat32(src->B); in readColor()
1481 dst->alpha = 1.0f; in readColor()
1484 void R16G16B16F::writeColor(R16G16B16F *dst, const gl::ColorF *src) in writeColor() argument
1486 dst->R = gl::float32ToFloat16(src->red); in writeColor()
1487 dst->G = gl::float32ToFloat16(src->green); in writeColor()
1488 dst->B = gl::float32ToFloat16(src->blue); in writeColor()
1491 void R16G16B16F::average(R16G16B16F *dst, const R16G16B16F *src1, const R16G16B16F *src2) in average() argument
1493 dst->R = gl::averageHalfFloat(src1->R, src2->R); in average()
1494 dst->G = gl::averageHalfFloat(src1->G, src2->G); in average()
1495 dst->B = gl::averageHalfFloat(src1->B, src2->B); in average()
1498 void A32B32G32R32F::readColor(gl::ColorF *dst, const A32B32G32R32F *src) in readColor() argument
1500 dst->red = src->R; in readColor()
1501 dst->green = src->G; in readColor()
1502 dst->blue = src->B; in readColor()
1503 dst->alpha = src->A; in readColor()
1506 void A32B32G32R32F::writeColor(A32B32G32R32F *dst, const gl::ColorF *src) in writeColor() argument
1508 dst->R = src->red; in writeColor()
1509 dst->G = src->green; in writeColor()
1510 dst->B = src->blue; in writeColor()
1511 dst->A = src->alpha; in writeColor()
1514 void A32B32G32R32F::average(A32B32G32R32F *dst, in average() argument
1518 dst->R = gl::average(src1->R, src2->R); in average()
1519 dst->G = gl::average(src1->G, src2->G); in average()
1520 dst->B = gl::average(src1->B, src2->B); in average()
1521 dst->A = gl::average(src1->A, src2->A); in average()
1524 void R32G32B32A32F::readColor(gl::ColorF *dst, const R32G32B32A32F *src) in readColor() argument
1526 dst->red = src->R; in readColor()
1527 dst->green = src->G; in readColor()
1528 dst->blue = src->B; in readColor()
1529 dst->alpha = src->A; in readColor()
1532 void R32G32B32A32F::writeColor(R32G32B32A32F *dst, const gl::ColorF *src) in writeColor() argument
1534 dst->R = src->red; in writeColor()
1535 dst->G = src->green; in writeColor()
1536 dst->B = src->blue; in writeColor()
1537 dst->A = src->alpha; in writeColor()
1540 void R32G32B32A32F::average(R32G32B32A32F *dst, in average() argument
1544 dst->R = gl::average(src1->R, src2->R); in average()
1545 dst->G = gl::average(src1->G, src2->G); in average()
1546 dst->B = gl::average(src1->B, src2->B); in average()
1547 dst->A = gl::average(src1->A, src2->A); in average()
1550 void R32F::readColor(gl::ColorF *dst, const R32F *src) in readColor() argument
1552 dst->red = src->R; in readColor()
1553 dst->green = 0.0f; in readColor()
1554 dst->blue = 0.0f; in readColor()
1555 dst->alpha = 1.0f; in readColor()
1558 void R32F::writeColor(R32F *dst, const gl::ColorF *src) in writeColor() argument
1560 dst->R = src->red; in writeColor()
1563 void R32F::average(R32F *dst, const R32F *src1, const R32F *src2) in average() argument
1565 dst->R = gl::average(src1->R, src2->R); in average()
1568 void A32F::readColor(gl::ColorF *dst, const A32F *src) in readColor() argument
1570 dst->red = 0.0f; in readColor()
1571 dst->green = 0.0f; in readColor()
1572 dst->blue = 0.0f; in readColor()
1573 dst->alpha = src->A; in readColor()
1576 void A32F::writeColor(A32F *dst, const gl::ColorF *src) in writeColor() argument
1578 dst->A = src->alpha; in writeColor()
1581 void A32F::average(A32F *dst, const A32F *src1, const A32F *src2) in average() argument
1583 dst->A = gl::average(src1->A, src2->A); in average()
1586 void L32F::readColor(gl::ColorF *dst, const L32F *src) in readColor() argument
1588 dst->red = src->L; in readColor()
1589 dst->green = src->L; in readColor()
1590 dst->blue = src->L; in readColor()
1591 dst->alpha = 1.0f; in readColor()
1594 void L32F::writeColor(L32F *dst, const gl::ColorF *src) in writeColor() argument
1596 dst->L = src->red; in writeColor()
1599 void L32F::average(L32F *dst, const L32F *src1, const L32F *src2) in average() argument
1601 dst->L = gl::average(src1->L, src2->L); in average()
1604 void L32A32F::readColor(gl::ColorF *dst, const L32A32F *src) in readColor() argument
1606 dst->red = src->L; in readColor()
1607 dst->green = src->L; in readColor()
1608 dst->blue = src->L; in readColor()
1609 dst->alpha = src->A; in readColor()
1612 void L32A32F::writeColor(L32A32F *dst, const gl::ColorF *src) in writeColor() argument
1614 dst->L = src->red; in writeColor()
1615 dst->A = src->alpha; in writeColor()
1618 void L32A32F::average(L32A32F *dst, const L32A32F *src1, const L32A32F *src2) in average() argument
1620 dst->L = gl::average(src1->L, src2->L); in average()
1621 dst->A = gl::average(src1->A, src2->A); in average()
1624 void R32G32F::readColor(gl::ColorF *dst, const R32G32F *src) in readColor() argument
1626 dst->red = src->R; in readColor()
1627 dst->green = src->G; in readColor()
1628 dst->blue = 0.0f; in readColor()
1629 dst->alpha = 1.0f; in readColor()
1632 void R32G32F::writeColor(R32G32F *dst, const gl::ColorF *src) in writeColor() argument
1634 dst->R = src->red; in writeColor()
1635 dst->G = src->green; in writeColor()
1638 void R32G32F::average(R32G32F *dst, const R32G32F *src1, const R32G32F *src2) in average() argument
1640 dst->R = gl::average(src1->R, src2->R); in average()
1641 dst->G = gl::average(src1->G, src2->G); in average()
1644 void R32G32B32F::readColor(gl::ColorF *dst, const R32G32B32F *src) in readColor() argument
1646 dst->red = src->R; in readColor()
1647 dst->green = src->G; in readColor()
1648 dst->blue = src->B; in readColor()
1649 dst->alpha = 1.0f; in readColor()
1652 void R32G32B32F::writeColor(R32G32B32F *dst, const gl::ColorF *src) in writeColor() argument
1654 dst->R = src->red; in writeColor()
1655 dst->G = src->green; in writeColor()
1656 dst->B = src->blue; in writeColor()
1659 void R32G32B32F::average(R32G32B32F *dst, const R32G32B32F *src1, const R32G32B32F *src2) in average() argument
1661 dst->R = gl::average(src1->R, src2->R); in average()
1662 dst->G = gl::average(src1->G, src2->G); in average()
1663 dst->B = gl::average(src1->B, src2->B); in average()
1666 void R10G10B10A2::readColor(gl::ColorUI *dst, const R10G10B10A2 *src) in readColor() argument
1668 dst->red = src->R; in readColor()
1669 dst->green = src->G; in readColor()
1670 dst->blue = src->B; in readColor()
1671 dst->alpha = src->A; in readColor()
1674 void R10G10B10A2::readColor(gl::ColorF *dst, const R10G10B10A2 *src) in readColor() argument
1676 dst->red = gl::normalizedToFloat<10>(src->R); in readColor()
1677 dst->green = gl::normalizedToFloat<10>(src->G); in readColor()
1678 dst->blue = gl::normalizedToFloat<10>(src->B); in readColor()
1679 dst->alpha = gl::normalizedToFloat<2>(src->A); in readColor()
1682 void R10G10B10A2::writeColor(R10G10B10A2 *dst, const gl::ColorUI *src) in writeColor() argument
1684 dst->R = static_cast<uint32_t>(src->red); in writeColor()
1685 dst->G = static_cast<uint32_t>(src->green); in writeColor()
1686 dst->B = static_cast<uint32_t>(src->blue); in writeColor()
1687 dst->A = static_cast<uint32_t>(src->alpha); in writeColor()
1690 void R10G10B10A2::writeColor(R10G10B10A2 *dst, const gl::ColorF *src) in writeColor() argument
1692 dst->R = gl::floatToNormalized<10, uint32_t>(src->red); in writeColor()
1693 dst->G = gl::floatToNormalized<10, uint32_t>(src->green); in writeColor()
1694 dst->B = gl::floatToNormalized<10, uint32_t>(src->blue); in writeColor()
1695 dst->A = gl::floatToNormalized<2, uint32_t>(src->alpha); in writeColor()
1698 void R10G10B10A2::average(R10G10B10A2 *dst, const R10G10B10A2 *src1, const R10G10B10A2 *src2) in average() argument
1700 dst->R = gl::average(src1->R, src2->R); in average()
1701 dst->G = gl::average(src1->G, src2->G); in average()
1702 dst->B = gl::average(src1->B, src2->B); in average()
1703 dst->A = gl::average(src1->A, src2->A); in average()
1706 void R10G10B10A2S::readColor(gl::ColorI *dst, const R10G10B10A2S *src) in readColor() argument
1708 dst->red = src->R; in readColor()
1709 dst->green = src->G; in readColor()
1710 dst->blue = src->B; in readColor()
1711 dst->alpha = src->A; in readColor()
1714 void R10G10B10A2S::readColor(gl::ColorF *dst, const R10G10B10A2S *src) in readColor() argument
1716 dst->red = gl::normalizedToFloat<10>(src->R); in readColor()
1717 dst->green = gl::normalizedToFloat<10>(src->G); in readColor()
1718 dst->blue = gl::normalizedToFloat<10>(src->B); in readColor()
1719 dst->alpha = gl::normalizedToFloat<2>(src->A); in readColor()
1722 void R10G10B10A2S::writeColor(R10G10B10A2S *dst, const gl::ColorI *src) in writeColor() argument
1724 dst->R = static_cast<int32_t>(src->red); in writeColor()
1725 dst->G = static_cast<int32_t>(src->green); in writeColor()
1726 dst->B = static_cast<int32_t>(src->blue); in writeColor()
1727 dst->A = static_cast<int32_t>(src->alpha); in writeColor()
1730 void R10G10B10A2S::writeColor(R10G10B10A2S *dst, const gl::ColorF *src) in writeColor() argument
1732 dst->R = gl::floatToNormalized<10, int32_t>(src->red); in writeColor()
1733 dst->G = gl::floatToNormalized<10, int32_t>(src->green); in writeColor()
1734 dst->B = gl::floatToNormalized<10, int32_t>(src->blue); in writeColor()
1735 dst->A = gl::floatToNormalized<2, int32_t>(src->alpha); in writeColor()
1738 void R10G10B10A2S::average(R10G10B10A2S *dst, const R10G10B10A2S *src1, const R10G10B10A2S *src2) in average() argument
1740 dst->R = gl::average(src1->R, src2->R); in average()
1741 dst->G = gl::average(src1->G, src2->G); in average()
1742 dst->B = gl::average(src1->B, src2->B); in average()
1743 dst->A = gl::average(src1->A, src2->A); in average()
1746 void R10G10B10X2::readColor(gl::ColorUI *dst, const R10G10B10X2 *src) in readColor() argument
1748 dst->red = src->R; in readColor()
1749 dst->green = src->G; in readColor()
1750 dst->blue = src->B; in readColor()
1751 dst->alpha = 0x3; in readColor()
1754 void R10G10B10X2::readColor(gl::ColorF *dst, const R10G10B10X2 *src) in readColor() argument
1756 dst->red = gl::normalizedToFloat<10>(src->R); in readColor()
1757 dst->green = gl::normalizedToFloat<10>(src->G); in readColor()
1758 dst->blue = gl::normalizedToFloat<10>(src->B); in readColor()
1759 dst->alpha = 1.0f; in readColor()
1762 void R10G10B10X2::writeColor(R10G10B10X2 *dst, const gl::ColorUI *src) in writeColor() argument
1764 dst->R = static_cast<uint32_t>(src->red); in writeColor()
1765 dst->G = static_cast<uint32_t>(src->green); in writeColor()
1766 dst->B = static_cast<uint32_t>(src->blue); in writeColor()
1769 void R10G10B10X2::writeColor(R10G10B10X2 *dst, const gl::ColorF *src) in writeColor() argument
1771 dst->R = gl::floatToNormalized<10, uint32_t>(src->red); in writeColor()
1772 dst->G = gl::floatToNormalized<10, uint32_t>(src->green); in writeColor()
1773 dst->B = gl::floatToNormalized<10, uint32_t>(src->blue); in writeColor()
1776 void R10G10B10X2::average(R10G10B10X2 *dst, const R10G10B10X2 *src1, const R10G10B10X2 *src2) in average() argument
1778 dst->R = gl::average(src1->R, src2->R); in average()
1779 dst->G = gl::average(src1->G, src2->G); in average()
1780 dst->B = gl::average(src1->B, src2->B); in average()
1783 void B10G10R10A2::readColor(gl::ColorUI *dst, const B10G10R10A2 *src) in readColor() argument
1785 dst->red = src->R; in readColor()
1786 dst->green = src->G; in readColor()
1787 dst->blue = src->B; in readColor()
1788 dst->alpha = src->A; in readColor()
1791 void B10G10R10A2::readColor(gl::ColorF *dst, const B10G10R10A2 *src) in readColor() argument
1793 dst->red = gl::normalizedToFloat<10>(src->R); in readColor()
1794 dst->green = gl::normalizedToFloat<10>(src->G); in readColor()
1795 dst->blue = gl::normalizedToFloat<10>(src->B); in readColor()
1796 dst->alpha = gl::normalizedToFloat<2>(src->A); in readColor()
1799 void B10G10R10A2::writeColor(B10G10R10A2 *dst, const gl::ColorUI *src) in writeColor() argument
1801 dst->R = static_cast<uint32_t>(src->red); in writeColor()
1802 dst->G = static_cast<uint32_t>(src->green); in writeColor()
1803 dst->B = static_cast<uint32_t>(src->blue); in writeColor()
1804 dst->A = static_cast<uint32_t>(src->alpha); in writeColor()
1807 void B10G10R10A2::writeColor(B10G10R10A2 *dst, const gl::ColorF *src) in writeColor() argument
1809 dst->R = gl::floatToNormalized<10, uint32_t>(src->red); in writeColor()
1810 dst->G = gl::floatToNormalized<10, uint32_t>(src->green); in writeColor()
1811 dst->B = gl::floatToNormalized<10, uint32_t>(src->blue); in writeColor()
1812 dst->A = gl::floatToNormalized<2, uint32_t>(src->alpha); in writeColor()
1815 void B10G10R10A2::average(B10G10R10A2 *dst, const B10G10R10A2 *src1, const B10G10R10A2 *src2) in average() argument
1817 dst->R = gl::average(src1->R, src2->R); in average()
1818 dst->G = gl::average(src1->G, src2->G); in average()
1819 dst->B = gl::average(src1->B, src2->B); in average()
1820 dst->A = gl::average(src1->A, src2->A); in average()
1823 void R9G9B9E5::readColor(gl::ColorF *dst, const R9G9B9E5 *src) in readColor() argument
1825 gl::convert999E5toRGBFloats(gl::bitCast<uint32_t>(*src), &dst->red, &dst->green, &dst->blue); in readColor()
1826 dst->alpha = 1.0f; in readColor()
1829 void R9G9B9E5::writeColor(R9G9B9E5 *dst, const gl::ColorF *src) in writeColor() argument
1831 *reinterpret_cast<uint32_t *>(dst) = in writeColor()
1835 void R9G9B9E5::average(R9G9B9E5 *dst, const R9G9B9E5 *src1, const R9G9B9E5 *src2) in average() argument
1843 *reinterpret_cast<uint32_t *>(dst) = in average()
1847 void R11G11B10F::readColor(gl::ColorF *dst, const R11G11B10F *src) in readColor() argument
1849 dst->red = gl::float11ToFloat32(src->R); in readColor()
1850 dst->green = gl::float11ToFloat32(src->G); in readColor()
1851 dst->blue = gl::float10ToFloat32(src->B); in readColor()
1852 dst->alpha = 1.0f; in readColor()
1855 void R11G11B10F::writeColor(R11G11B10F *dst, const gl::ColorF *src) in writeColor() argument
1857 dst->R = gl::float32ToFloat11(src->red); in writeColor()
1858 dst->G = gl::float32ToFloat11(src->green); in writeColor()
1859 dst->B = gl::float32ToFloat10(src->blue); in writeColor()
1862 void R11G11B10F::average(R11G11B10F *dst, const R11G11B10F *src1, const R11G11B10F *src2) in average() argument
1864 dst->R = gl::averageFloat11(src1->R, src2->R); in average()
1865 dst->G = gl::averageFloat11(src1->G, src2->G); in average()
1866 dst->B = gl::averageFloat10(src1->B, src2->B); in average()
1869 void D24S8::ReadDepthStencil(DepthStencil *dst, const D24S8 *src) in ReadDepthStencil() argument
1871 dst->depth = gl::normalizedToFloat<24>(src->D); in ReadDepthStencil()
1872 dst->stencil = src->S; in ReadDepthStencil()
1875 void D24S8::WriteDepthStencil(D24S8 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1877 dst->D = gl::floatToNormalized<24, uint32_t>(static_cast<float>(src->depth)); in WriteDepthStencil()
1878 dst->S = src->stencil & 0xFF; in WriteDepthStencil()
1881 void S8::ReadDepthStencil(DepthStencil *dst, const S8 *src) in ReadDepthStencil() argument
1883 dst->depth = 0; in ReadDepthStencil()
1884 dst->stencil = src->S; in ReadDepthStencil()
1887 void S8::WriteDepthStencil(S8 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1889 dst->S = src->stencil & 0xFF; in WriteDepthStencil()
1892 void D16::ReadDepthStencil(DepthStencil *dst, const D16 *src) in ReadDepthStencil() argument
1894 dst->depth = gl::normalizedToFloat(src->D); in ReadDepthStencil()
1895 dst->stencil = 0; in ReadDepthStencil()
1898 void D16::WriteDepthStencil(D16 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1900 dst->D = gl::floatToNormalized<uint16_t>(static_cast<float>(src->depth)); in WriteDepthStencil()
1903 void D24X8::ReadDepthStencil(DepthStencil *dst, const D24X8 *src) in ReadDepthStencil() argument
1905 dst->depth = gl::normalizedToFloat<24>(src->D & 0x00ffffff); in ReadDepthStencil()
1908 void D24X8::WriteDepthStencil(D24X8 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1910 dst->D = gl::floatToNormalized<24, uint32_t>(static_cast<float>(src->depth)); in WriteDepthStencil()
1913 void D32F::ReadDepthStencil(DepthStencil *dst, const D32F *src) in ReadDepthStencil() argument
1915 dst->depth = src->D; in ReadDepthStencil()
1918 void D32F::WriteDepthStencil(D32F *dst, const DepthStencil *src) in WriteDepthStencil() argument
1920 dst->D = static_cast<float>(src->depth); in WriteDepthStencil()
1923 void D32::ReadDepthStencil(DepthStencil *dst, const D32 *src) in ReadDepthStencil() argument
1925 dst->depth = gl::normalizedToFloat(src->D); in ReadDepthStencil()
1926 dst->stencil = 0; in ReadDepthStencil()
1929 void D32::WriteDepthStencil(D32 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1931 dst->D = gl::floatToNormalized<uint32_t>(static_cast<float>(src->depth)); in WriteDepthStencil()
1934 void D32FS8X24::ReadDepthStencil(DepthStencil *dst, const D32FS8X24 *src) in ReadDepthStencil() argument
1936 dst->depth = src->D; in ReadDepthStencil()
1937 dst->stencil = src->S; in ReadDepthStencil()
1940 void D32FS8X24::WriteDepthStencil(D32FS8X24 *dst, const DepthStencil *src) in WriteDepthStencil() argument
1942 dst->D = static_cast<float>(src->depth); in WriteDepthStencil()
1943 dst->S = src->stencil & 0xFF; in WriteDepthStencil()