1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __rendercontrol_hh
3 #define __rendercontrol_hh
15 const ScreenInfo *_screen;
19 int _cpc; // colors-per-channel: must be a value between [2,6]
20 int _bpp; // bits-per-pixel
22 unsigned int *_grad_xbuffer;
23 unsigned int *_grad_ybuffer;
24 unsigned int _grad_buffer_width;
25 unsigned int _grad_buffer_height;
27 unsigned long *_sqrt_table;
29 // These values are all determined based on a visual
31 int _red_bits; // the number of bits (1-255) that each shade of color
32 int _green_bits; // spans across. best case is 1, which gives 255 shades.
34 unsigned char _red_color_table[256];
35 unsigned char _green_color_table[256];
36 unsigned char _blue_color_table[256];
38 // These are only used for TrueColor visuals
39 int _red_offset; // the offset of each color in a color mask
43 // These are only used for !TrueColor visuals
48 RenderControl(const ScreenInfo *screen);
51 virtual ~RenderControl();
53 static RenderControl *getRenderControl(int screen);
55 virtual void render(::Drawable d) = 0;
60 #endif // __rendercontrol_hh