Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Fullscreen on Mac OSX Mountain Lion not working

This thread is locked; no one can reply to it. rss feed Print
Fullscreen on Mac OSX Mountain Lion not working
Guilhermo
Member #14,986
March 2013

Hi,

I'm having trouble setting allegro to display in fullscreen. I've tried using v5.0 and 5.1.7 but none seemed to work.

#SelectExpand
1 ALLEGRO_DISPLAY *display = NULL; 2 ALLEGRO_DISPLAY_MODE disp_data; 3 ALLEGRO_EVENT_QUEUE *event_queue = NULL; 4 ALLEGRO_EVENT ev; 5 ALLEGRO_TIMER *logicTimer = NULL; 6 bool redraw = true; 7 8 if(!al_init()) { 9 fprintf(stderr, "failed to initialize allegro!\n"); 10 return -1; 11 } 12 al_init_image_addon(); 13 al_init_font_addon(); 14 al_init_ttf_addon(); 15 al_init_primitives_addon(); 16 17 al_get_display_mode(al_get_num_display_modes()-1, &disp_data); 18 al_set_new_display_option(ALLEGRO_VSYNC, 1, ALLEGRO_REQUIRE); 19 al_set_new_display_flags(ALLEGRO_FULLSCREEN); 20 21 display = al_create_display(disp_data.width, disp_data.height); 22 23 if(!display) { 24 fprintf(stderr, "failed to create display!\n"); 25 return -1; 26 }

When I try to run this I receive this message: "invalid fullscreen drawable"
Does anyone have a solution for this?

Thanks.

Trent Gamblin
Member #261
April 2000
avatar

It needs to be fixed in Allegro. It's a known issue but nobody has yet had the time or known how to fix it. We accept patches! :)

Elias
Member #358
May 2000

Full screen window works (gives your window a full screen button) and may be more expected for Mac users anyway.

--
"Either help out or stop whining" - Evert

Michael Moffitt
Member #15,246
July 2013

In writing for Windows using DirectX, if I create a window of 320x240 size, and allow it to be resizable, when I stretch or maximize the window the display stretches as well, but internally is still considered 320x240, and the size of my backbuffer has not changed at all. Is there any way to get this functionality using OpenGL on either Linux or OS X?

Trent Gamblin
Member #261
April 2000
avatar

Not exactly because that's not how it's intended to work. You're supposed to call al_acknowledge_resize when you get an ALLEGRO_EVENT_DISPLAY_RESIZE event. You can mimic that behavior on all platforms using the ALLEGRO_TRANSFORM apis, but you should not rely on it even on Windows.

Go to: