Classes |
struct | vgui_pixel_assert< 2, 2 > |
struct | vgui_pixel_assert< 3, 3 > |
struct | vgui_pixel_assert< 4, 4 > |
struct | vgui_pixel_generates_no_code |
Defines |
#define | as(T, sz) vgui_pixel_assert<sizeof(T), sz> T##_is_##sz |
#define | SET_FF(x) x = 0; x = ~x |
| Set an int of unknown size to all-bits-one.
|
#define | VGUI_PIXEL_CONVERT_SPAN_DO(S, D, Code) |
| This macro is used to generate a "vgui_pixel_convert_span(S*, D*)" function with body "Code".
|
Functions |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_rgb888,{d.R=d.G=d.B=s;}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_bgr888,{d.R=d.G=d.B=s;}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_rgb565,{d.R=d.B=(s >> 3);d.G=(s >> 2);}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_bgra5551,{d.R=d.G=d.B=(s >>3);SET_FF(d.A);}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_rgba8888,{d.R=d.G=d.B=s;SET_FF(d.A);}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_abgr8888,{d.R=d.G=d.B=s;SET_FF(d.A);}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (GLubyte, vgui_pixel_bgra8888,{d.R=d.G=d.B=s;SET_FF(d.A);}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (vgui_pixel_rgb888, vgui_pixel_rgb888,{d=s;}) |
| VGUI_PIXEL_CONVERT_SPAN_DO (float, vgui_pixel_bgra5551,{d.R=d.G=d.B=clamp(s)>>3;SET_FF(d.A);}) VGUI_PIXEL_CONVERT_SPAN_DO(float |
| SET_FF (d.A) |
| VGUI_PIXEL_CONVERT_SPAN_DO (float, vgui_pixel_abgr8888,{d.R=d.G=d.B=clamp(s);SET_FF(d.A);}) VGUI_PIXEL_CONVERT_SPAN_DO(float |
Variables |
| vgui_pixel_rgba8888 |
d | R = d.G = d.B = clamp(s) |
| vgui_pixel_bgra8888 |
See vgui_pixel.h for a description of this file.
- Author:
- fsm
Definition in file vgui_pixel.cxx.
#define VGUI_PIXEL_CONVERT_SPAN_DO |
( |
|
S, |
|
|
|
D, |
|
|
|
Code |
|
) |
| |
Value:void vgui_pixel_convert_span(S const *src, D *dst, unsigned size) { \
for (unsigned i=0; i<size; ++i) { \
S const& s = src[i]; \
D & d = dst[i]; \
Code; \
}\
}
This macro is used to generate a "vgui_pixel_convert_span(S*, D*)" function with body "Code".
Within Code, s is a reference to the source pixel, d to the destination. Remember, vgui_pixel_convert_span is not a function template -- each overload has rather different code.
Definition at line 56 of file vgui_pixel.cxx.