|
AllegroGL Minimize Window |
Phineas
Member #5,696
April 2005
|
I am using Windows XP. Whenever I run my AllegroGL program in a window, minimize the window, and then restore it, the program no longer draws to the screen. Using the Visual Studio debugger, I know the drawing code is still being run in the loop. Attached are before and after pictures to show what's happening. Thanks for your help.
|
Arthur Kalliokoski
Second in Command
February 2005
|
I don't know if this'll help or not... http://www.allegro.cc/manual/api/graphics-modes/set_display_switch_mode They all watch too much MSNBC... they get ideas. |
Phineas
Member #5,696
April 2005
|
Thanks for your reply. I tried every possible setting for set_display_switch_mode but to no avail. I also tried setting a display switch callback using set_display_switch_callback. Here's the code I tried inside it, separately: allegro_gl_clear_settings(); allegro_gl_set(AGL_COLOR_DEPTH, 32); allegro_gl_set(AGL_WINDOWED, 1); allegro_gl_set(AGL_DOUBLEBUFFER, 1); allegro_gl_set(AGL_RENDERMETHOD, 1); if (set_gfx_mode(GFX_OPENGL, 800, 600, 0, 0) < 0) { allegro_message("Error setting OpenGL graphics mode:\n%s\n" "Allegro GL error : %s\n", allegro_error, allegro_gl_error); }
glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(-2.0, 2.0, -2.0, 2.0); glMatrixMode(GL_MODELVIEW); glViewport(0, 0, 800, 600); It still doesn't work. This problem with minimizing and restoring the program also happens on my computer with the examples that come with AllegroGL. |
Bob
Free Market Evangelist
September 2000
|
I can't reproduce this. What version of AllegroGL are you using? What version of Allegro are you using? What compiler? What graphics card/driver do you have? I tested this on both TOT and AGL 0.4.0-RC4 with Allegro 4.2.0 and MSVC7.1 and don't see anything wrong. -- |
Epsi
Member #5,731
April 2005
|
I have exactly the same problem on my desktop PC. - Using OpenLayer latest SVN (don't know what AGL version). The same code works however correctly on my laptop with a GeForce and the same OL version. ___________________________________ piccolo: "soon all new 2d alegro games will be better. after i finsh my MMRPG. my game will serve as a code reference. so you can understand and grab code from." |
Phineas
Member #5,696
April 2005
|
I'm using Allegro 4.2.0 (compiled myself) and AllegroGL 0.2.4 (binaries taken from Retrospec). I also tried AllegroGL 0.4.0 (compiled myself), but the problem still exists. I'm using MSVC 7.1 and I have an ATI Radeon 9550. |
Bob
Free Market Evangelist
September 2000
|
AllegroGL 0.2.4 does not work correctly with Allegro 4.x where x > 0. You really need to be using AllegroGL 0.4.0 or later. If you use AllegroGL 0.4.0, does the problem still exist for the example programs? Have you tried updating your video drivers? -- |
Phineas
Member #5,696
April 2005
|
Alright, I'm using only 0.4.0 RC4 now, and I upgraded to the latest ATI driver. The problem still exists for my program and for the examples. I also tried using the debug version of AllegroGL. Here's the head and tail of the debug output:
|
Bob
Free Market Evangelist
September 2000
|
Can anyone else repro this? -- |
Milan Mimica
Member #3,877
September 2003
|
No, but this errors and warnings in the log file are expected for RC4.
-- |
|