1gfx_capabilities(3)             Allegro manual             gfx_capabilities(3)
2
3
4

NAME

6       gfx_capabilities  -  Bitfield  describing  video hardware capabilities.
7       Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       extern int gfx_capabilities;
14

DESCRIPTION

16       Bitfield describing the capabilities of the current graphics driver and
17       video hardware. This may contain combination any of the flags:
18
19       GFX_CAN_SCROLL: Indicates that the scroll_screen() function may be used
20       with this driver.
21
22       GFX_CAN_TRIPLE_BUFFER:  Indicates   that   the   request_scroll()   and
23       poll_scroll()  functions  may be used with this driver. If this flag is
24       not set, it is possible that the enable_triple_buffer() function may be
25       able to activate it.
26
27       GFX_HW_CURSOR:  Indicates  that a hardware mouse cursor is in use. When
28       this flag is set, it is safe to draw onto the screen without hiding the
29       mouse  pointer  first. Note that not every cursor graphic can be imple‐
30       mented in hardware: in particular VBE/AF only supports  2-color  images
31       up  to 32x32 in size, where the second color is an exact inverse of the
32       first. This means that Allegro may need to switch between hardware  and
33       software  cursors at any point during the execution of your program, so
34       you should not assume that this flag  will  remain  constant  for  long
35       periods  of time. It only tells you whether a hardware cursor is in use
36       at the current time, and may change  whenever  you  hide/redisplay  the
37       pointer.
38
39       GFX_SYSTEM_CURSOR Indicates that the mouse cursor is the default system
40       cursor, not Allegro's custom cursor.
41
42       GFX_HW_HLINE: Indicates that the normal opaque version of  the  hline()
43       function is implemented using a hardware accelerator. This will improve
44       the performance not only of hline() itself,  but  also  of  many  other
45       functions  that use it as a workhorse, for example circlefill(), trian‐
46       gle(), and floodfill().
47
48       GFX_HW_HLINE_XOR: Indicates that the XOR version of the  hline()  func‐
49       tion,  and  any  other functions that use it as a workhorse, are imple‐
50       mented using a hardware accelerator.
51
52       GFX_HW_HLINE_SOLID_PATTERN: Indicates that the solid and masked pattern
53       modes of the hline() function, and any other functions that use it as a
54       workhorse, are implemented  using  a  hardware  accelerator  (see  note
55       below).
56
57       GFX_HW_HLINE_COPY_PATTERN:  Indicates that the copy pattern mode of the
58       hline() function, and any other functions that use it as  a  workhorse,
59       are implemented using a hardware accelerator (see note below).
60
61       GFX_HW_FILL:  Indicates that the opaque version of the rectfill() func‐
62       tion, the clear_bitmap() routine, and clear_to_color(), are implemented
63       using a hardware accelerator.
64
65       GFX_HW_FILL_XOR: Indicates that the XOR version of the rectfill() func‐
66       tion is implemented using a hardware accelerator.
67
68       GFX_HW_FILL_SOLID_PATTERN: Indicates that the solid and masked  pattern
69       modes  of  the  rectfill()  function  are  implemented using a hardware
70       accelerator (see note below).
71
72       GFX_HW_FILL_COPY_PATTERN: Indicates that the copy pattern mode  of  the
73       rectfill()  function  is  implemented using a hardware accelerator (see
74       note below).
75
76       GFX_HW_LINE: Indicates that the opaque mode line()  and  vline()  func‐
77       tions are implemented using a hardware accelerator.
78
79       GFX_HW_LINE_XOR:  Indicates  that  the  XOR  version  of the line() and
80       vline() functions are implemented using a hardware accelerator.
81
82       GFX_HW_TRIANGLE: Indicates that the opaque mode triangle() function  is
83       implemented using a hardware accelerator.
84
85       GFX_HW_TRIANGLE_XOR:  Indicates  that the XOR version of the triangle()
86       function is implemented using a hardware accelerator.
87
88       GFX_HW_GLYPH: Indicates that monochrome character expansion  (for  text
89       drawing) is implemented using a hardware accelerator.
90
91       GFX_HW_VRAM_BLIT:  Indicates  that blitting from one part of the screen
92       to another is implemented using a hardware accelerator. If this flag is
93       set,  blitting  within  the  video  memory will almost certainly be the
94       fastest possible way to display an image, so it may  be  worth  storing
95       some  of  your more frequently used graphics in an offscreen portion of
96       the video memory.
97
98       GFX_HW_VRAM_BLIT_MASKED: Indicates that the  masked_blit()  routine  is
99       capable of a hardware accelerated copy from one part of video memory to
100       another, and that draw_sprite() will use a hardware copy when  given  a
101       sub-bitmap  of the screen or a video memory bitmap as the source image.
102       If this flag is set, copying within the video memory will  almost  cer‐
103       tainly  be  the  fastest possible way to display an image, so it may be
104       worth storing some of your more frequently used sprites in an offscreen
105       portion of the video memory.
106
107       Warning:  if this flag is not set, masked_blit() and draw_sprite() will
108       not work correctly when used with a video memory source image! You must
109       only try to use these functions to copy within the video memory if they
110       are supported in hardware.
111
112       GFX_HW_MEM_BLIT: Indicates that blitting from a memory bitmap onto  the
113       screen is being accelerated in hardware.
114
115       GFX_HW_MEM_BLIT_MASKED:    Indicates   that   the   masked_blit()   and
116       draw_sprite() functions are being  accelerated  in  hardware  when  the
117       source  image  is  a  memory bitmap and the destination is the physical
118       screen.
119
120       GFX_HW_SYS_TO_VRAM_BLIT: Indicates that blitting from a  system  bitmap
121       onto the screen is being accelerated in hardware. Note that some accel‐
122       eration may be present even if this flag is  not  set,  because  system
123       bitmaps can benefit from normal memory to screen blitting as well. This
124       flag will only be set if system bitmaps have further acceleration above
125       and beyond what is provided by GFX_HW_MEM_BLIT.
126
127       GFX_HW_SYS_TO_VRAM_BLIT_MASKED:  Indicates  that  the masked_blit() and
128       draw_sprite() functions are being  accelerated  in  hardware  when  the
129       source  image  is  a  system bitmap and the destination is the physical
130       screen. Note that some acceleration may be present even if this flag is
131       not  set,  because  system  bitmaps  can  benefit from normal memory to
132       screen blitting as well. This flag will only be set if  system  bitmaps
133       have  further  acceleration  above  and  beyond  what  is  provided  by
134       GFX_HW_MEM_BLIT_MASKED.
135
136       GFX_HW_VRAM_STRETCH_BLIT: Indicates that stretched  blitting  of  video
137       bitmaps onto the screen is implemented using hardware acceleration.
138
139       GFX_HW_SYS_STRETCH_BLIT:  Indicates  that  stretched blitting of system
140       bitmaps onto the screen is implemented using hardware acceleration.
141
142       GFX_HW_VRAM_STRETCH_BLIT_MASKED: Indicates that masked stretched  blit‐
143       ting  (including  stretch_sprite)  of  video bitmaps onto the screen is
144       implemented using hardware acceleration.  NOTE:  some  display  drivers
145       may  show  artifacts when this function is used.  If the image does not
146       look correct try updating your video drivers.
147
148       GFX_HW_SYS_STRETCH_BLIT_MASKED: Indicates that masked  stretched  blit‐
149       ting  (including  stretch_sprite)  of system bitmaps onto the screen is
150       implemented using hardware acceleration.  NOTE:  some  display  drivers
151       may  show artefact's when this function is used.  If the image does not
152       look correct try updating your video drivers.
153
154       Note: even if the capabilities information says that patterned  drawing
155       is supported by the hardware, it will not be possible for every size of
156       pattern. VBE/AF only supports patterns up to 8x8 in  size,  so  Allegro
157       will  fall  back on the original non-accelerated drawing routines when‐
158       ever you use a pattern larger than this.
159
160       Note2: these hardware acceleration features will only take effect  when
161       you are drawing directly onto the screen bitmap, a video memory bitmap,
162       or a sub-bitmap thereof. Accelerated hardware is most useful in a  page
163       flipping or triple buffering setup, and is unlikely to make any differ‐
164       ence to the classic "draw onto  a  memory  bitmap,  then  blit  to  the
165       screen" system.
166
167

SEE ALSO

169       screen(3), create_video_bitmap(3), scroll_screen(3), request_scroll(3),
170       show_mouse(3),    enable_triple_buffer(3),    ex3buf(3),    exaccel(3),
171       exsyscur(3), exupdate(3)
172
173
174
175Allegro                          version 4.2.2             gfx_capabilities(3)
Impressum