|
Allegro - Display |
Salwan
Member #7,540
July 2006
|
Hi everyone, I'm trying to create a small simple utility library using Allegro to make writing apps easier for me, this is the first time I use Allegro, my problem is in the class that handles displaying the screen, the display wrapper that I wrote works fine with fullscreen mode using hardware triple buffering, but it doesn't display anything when switching to windowed mode using software double buffering, and after sometime the application crashes. Here's the Display class code:
|
Onewing
Member #6,152
August 2005
|
Quote: when switching to windowed mode Do you mean, while your program is running? Switching modes while running can cause a whole other set of questions/problems. ------------ |
Salwan
Member #7,540
July 2006
|
No I did not mean that, it does not takeplace while the app is running, whether fullscreen or windowed is decided by the app before setting a gfx mode. |
miran
Member #2,407
June 2002
|
Your application crashes on cleanup if you init it with "screen" as a parameter. You're not supposed to destroy the screen bitmap. -- |
Salwan
Member #7,540
July 2006
|
Thank you very much for the replies. miran: You are very correct sir, that's why the app crashes on exit, thank you. I still don't see anything when in windowed mode, just a blank white background, I'll leave it for now and I'll probably go back to review all the code all over again in a couple of days, maybe then I'll find something I did not notice before? |
Trent Gamblin
Member #261
April 2000
|
You're setting active_page to 1 in init then blitting page 1 to page 1 in flip. You should set active_page to 0 in init.
|
Salwan
Member #7,540
July 2006
|
[quote=Trent Gamblin] Oh...My...God... that is so embarrassing. Thank you Trent Gamblin for the solution, and thank you all who replied, next time I will try much harder to find the problem. |
Trent Gamblin
Member #261
April 2000
|
It happens to me all the time.
|
Ceagon Xylas
Member #5,495
February 2005
|
Don't be hard on yourself, I didn't know how to use a makefile until 2 days ago. =] |
|