ClanSoft logo
ClanSoft logo

    CL_Display

Main Display class.

Description

CL_Display is the "main" class when dealing with 2D graphics. It contains simple drawing operations, backbuffer clipping and access to the display cards available on the system.

A large amount of the functions in the class have the same purpose as their name equalient in CL_DisplayCard. The difference is that those placed here operate on a selected display card, while those in CL_DisplayCard class require an instance to the card.

All backbuffer related drawing operations in other classes (CL_Surface for instance) work on the currently selected display card, unless you explict pass a pointer pointing to a display card.

The main purpose of this system is to avoid passing around a pointer to the display card in those games, where it only access one single card anyway.

When using OpenGL the GL context will always point to the selected card. So if you need to use OpenGL commands to draw onto another card, you have to select it here.

Class members

virtual ~CL_Display()
static void flip_display(bool sync=false)
static void clear_display( float red=0, float green=0, float blue=0, float alpha=1)
static void set_palette(CL_Palette *palette)
static CL_Palette *get_palette()
static void select_card(CL_DisplayCard *card)
static CL_DisplayCard *get_current_card()
static void set_videomode(CL_VidMode *mode)
static void set_videomode( int width, int height, int bpp, bool fullscreen = true, bool allow_resize = false, bool video_memory = true)
static CL_Target *get_target()
static int get_width()
static int get_height()
static int get_bpp()
static std::vector<CL_DisplayCard*> cards
static void push_clip_rect()
static void push_clip_rect(const CL_ClipRect &rect)
static CL_ClipRect get_clip_rect()
static void set_clip_rect(const CL_ClipRect &rect)
static void pop_clip_rect()
static void push_translate_offset()
static void push_translate_offset( int x, int y)
static int get_translate_offset_x()
static int get_translate_offset_y()
static void set_translate_offset( int x, int y)
static void pop_translate_offset()
static void fill_rect( int x1, int y1, int x2, int y2, float r, float g, float b, float a=1.0f)
static void draw_line( int x1, int y1, int x2, int y2, float r, float g, float b, float a=1.0f)
static void sync_buffers()
static void fill_rect( int x1, int y1, int x2, int y2, CL_Surface *fill_surface, int focus_x=0, int focus_y=0)
static thSignal_v2<int, int> &get_sig_resize()

See Also

None


Back to index



This page was built using the Perceps documentation system.