Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / dbSetWindowOff() and dbSetDisplayMode(...) do not work as they should

Author
Message
icarus
14
Years of Service
User Offline
Joined: 20th Jan 2010
Location:
Posted: 8th Apr 2010 01:03
Hi

Im an intermediate C++ programmer and I've started learning how to use the Dark GDK. As I started writing some code I always had the problem that images weren't drawn as they should be.

Here you can see a very simple code. Everything works nicely until I call dbSetWindowOff() and dbSetDisplayMode(...). If I do, the screen remains black without any change.
It works very well though if i comment out these two function calls.


Have you any idea what could be wrong? As far as I know I use these two functions correctly.
Bran flakes91093
16
Years of Service
User Offline
Joined: 13th Sep 2008
Location: Crazy Land
Posted: 8th Apr 2010 03:10
Try to put them before you load any media, because I'm pretty sure that when you change screen resolution or go to fullscreen, all media is lost because the directx device gets reset. The same happens when the game is alt-tabbed out of.

"A computer once beat me at chess, but it was no match for me at kick boxing."
Emo Philips
icarus
14
Years of Service
User Offline
Joined: 20th Jan 2010
Location:
Posted: 8th Apr 2010 03:25
Yes, that was the right answer. I do not have any experience in DirectX programing. Maybe I should read a book and learn how to use DirectX.

So every time the screen resolution or related things are changed, the images have to be reloaded?

Thx very much for your help.

Login to post a reply

Server time is: 2024-10-02 03:26:46
Your offset time is: 2024-10-02 03:26:46