![]() |
|
ex_resize |
Peter Hull
Member #1,136
March 2001
|
Quick question - in ex_resize, is the A supposed to fit exactly in the window?
|
Elias
Member #358
May 2000
|
https://github.com/liballeg/allegro5/blob/master/examples/ex_resize.c w = al_get_bitmap_width(al_get_target_bitmap()); h = al_get_bitmap_height(al_get_target_bitmap()); al_draw_line(0, h, w / 2, 0, black, 0); al_draw_line(w / 2, 0, w, h, black, 0); al_draw_line(w / 4, h / 2, 3 * w / 4, h / 2, black, 0); So the answer is yes, the two feet of the A are the bottom left and right corners exactly and the top is at the very top. -- |
Peter Hull
Member #1,136
March 2001
|
I ask because, yes it does on Linux but not on MacOS. It seems like if you resize the window, it re-scales the GL context so that it has the same size as the original (100x100 in this case)
|
Elias
Member #358
May 2000
|
Hm, yeah, my first guess would be that al_resize_display() does not work correctly under MacOS. -- |
Peter Hull
Member #1,136
March 2001
|
These functions get called:
and in _al_ogl_resize_backbuffer it sets up a transformation involving the width and height. It's very confusing. I think the next step is to trace the same call on X11 and see where it differs - unless you can jump straight to the solution!?
|
|