[AD] using suggest with multisampling |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: [AD] using suggest with multisampling
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Sat, 18 Jun 2011 00:10:11 -0500
Attached is a patch to:
* change examples to always use SUGGEST with the display option for
the number of samples.
* Fixes a typo in the skater demo.
* enables multisampling on the speed demo
Any objections?
--
Matthew Leverton
Index: demos/speed/main.c
===================================================================
--- demos/speed/main.c (revision 14800)
+++ demos/speed/main.c (working copy)
@@ -297,6 +297,9 @@
}
/* set the screen mode */
+ al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
+ al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_SUGGEST);
+
al_set_new_display_flags(display_flags);
screen = al_create_display(w, h);
if (!screen) {
Index: demos/skater/src/global.c
===================================================================
--- demos/skater/src/global.c (revision 14800)
+++ demos/skater/src/global.c (working copy)
@@ -203,11 +203,11 @@
if (screen_samples > 1) {
al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_SUGGEST);
- al_set_new_display_option(ALLEGRO_SAMPLES, screen_samples, ALLEGRO_SAMPLES);
+ al_set_new_display_option(ALLEGRO_SAMPLES, screen_samples, ALLEGRO_SUGGEST);
}
else {
al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 0, ALLEGRO_SUGGEST);
- al_set_new_display_option(ALLEGRO_SAMPLES, 0, ALLEGRO_SAMPLES);
+ al_set_new_display_option(ALLEGRO_SAMPLES, 0, ALLEGRO_SUGGEST);
}
/* Attempt to set the selected colour depth and gfx mode. */
Index: examples/ex_multisample.c
===================================================================
--- examples/ex_multisample.c (revision 14800)
+++ examples/ex_multisample.c (working copy)
@@ -30,7 +30,7 @@
al_install_keyboard();
al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_REQUIRE);
- al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_REQUIRE);
+ al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_SUGGEST);
ms_display = al_create_display(200, 200);
if (!ms_display) {
printf("Multisampling not available.\n");
@@ -39,7 +39,7 @@
al_set_window_title(ms_display, "Multisampling");
al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 0, ALLEGRO_REQUIRE);
- al_set_new_display_option(ALLEGRO_SAMPLES, 0, ALLEGRO_REQUIRE);
+ al_set_new_display_option(ALLEGRO_SAMPLES, 0, ALLEGRO_SUGGEST);
display = al_create_display(200, 200);
al_set_window_title(display, "Normal");
Index: examples/ex_draw.c
===================================================================
--- examples/ex_draw.c (revision 14800)
+++ examples/ex_draw.c (working copy)
@@ -308,7 +308,7 @@
if (ex.samples) {
al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_REQUIRE);
- al_set_new_display_option(ALLEGRO_SAMPLES, ex.samples, ALLEGRO_REQUIRE);
+ al_set_new_display_option(ALLEGRO_SAMPLES, ex.samples, ALLEGRO_SUGGEST);
}
display = al_create_display(640, 640);
if (!display) {