Arnaud Maye
03-11-2007, 06:22 AM
Hi Guys,
I am finishing a diploma project. The project is a game, which having a shell as well as a game. The point is having a system "arcade game" a like.
The shell is using opengl to render various user interface menus and displays as well as processing inputs (coin insertion, start game botton, other buttons, operator menus and such).
When a "start button" is pressed, I launch the game as a separate process, and minimizing the shell window to stop rendering. At this time the shell is on sleep mode , as the game sent a VM_SLEEP custom message. When message WM_WAKE up is received from the game, the shell start to render again on full screen. This gets no cpu usage for the shell while the game process is running.
The problem is that resource are still used by the shell (ie Rendering context still active and not destroyed ) which causes perforances issues in the game obviously.
I would like to know if there is a way to "sleep" the rendering on my shell without the delete the rendering context and destroy the window.
If I destroy the rendering context, obviously I need to reload all texture and providing various inits.
If I close the window, obviously I will not receive the VM_WAKEUP signal from the game.
If I could "sleep" the resource used by the shell till the WM_WAKEUP message is received, I would not have performance issues on the game anymore.
Does anyone has ideas, pointers or clue in how to achieve this?
Kind Regards
I am finishing a diploma project. The project is a game, which having a shell as well as a game. The point is having a system "arcade game" a like.
The shell is using opengl to render various user interface menus and displays as well as processing inputs (coin insertion, start game botton, other buttons, operator menus and such).
When a "start button" is pressed, I launch the game as a separate process, and minimizing the shell window to stop rendering. At this time the shell is on sleep mode , as the game sent a VM_SLEEP custom message. When message WM_WAKE up is received from the game, the shell start to render again on full screen. This gets no cpu usage for the shell while the game process is running.
The problem is that resource are still used by the shell (ie Rendering context still active and not destroyed ) which causes perforances issues in the game obviously.
I would like to know if there is a way to "sleep" the rendering on my shell without the delete the rendering context and destroy the window.
If I destroy the rendering context, obviously I need to reload all texture and providing various inits.
If I close the window, obviously I will not receive the VM_WAKEUP signal from the game.
If I could "sleep" the resource used by the shell till the WM_WAKEUP message is received, I would not have performance issues on the game anymore.
Does anyone has ideas, pointers or clue in how to achieve this?
Kind Regards