Jump to content

View more

View more

Image of the Day

Working on an auto spawn system. #gamedev #indiedev #screenshotsaturday https://t.co/Mm2kfekz7b
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

to use scrnsave.lib or not?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
3 replies to this topic

#1 Raloth   Members   

379
Like
Likes
Like

Posted 28 March 2004 - 08:07 AM

I am writing a little artificial life screensaver. I have a basic thing up and running using scrnsave.lib but I plan on using DirectX for graphics. If I use the scrnsave.lib I have no control over the main loop and I must use timers to do updates which can be slow. They also can''t be easily adjusted to make up for slower frame rates, and if it takes longer to render a frame than the timer delay bad things will happen. Am I better off forgetting about the library and handling all of the messages and things myself?

#2 krez   Members   

443
Like
Likes
Like

Posted 28 March 2004 - 08:09 AM

it really isn''t hard to write a screensaver, you just have to draw whatever you want in fullscreen, and turn it off when the mouse moves or a key is pressed. oh, and handle 2 or three command-line options, for the settings dialogue and the preview...

#3 BriTeg   Members   

168
Like
Likes
Like

Posted 28 March 2004 - 10:14 AM

My advice is forget about scrnsave.lib, for the reasons you mentioned.

You can check out my Win32 screen saver tutorial and my MFC screen saver tutorial, which will give you the framework. Those tutorials use GDI, but it''s easy to replace that with DirectX or OpenGL if you want. And email me if you have any questions.

Brian

#4 Merick   Members   

122
Like
Likes
Like

Posted 12 April 2004 - 04:55 AM

I also wouldn't recommend scrnsave.lib

I've discovered that how ever scrnsave.lib chooses to implement exiting, it does not call the standard atexit function. Therefore, any singleton objects you might have, will not get their destructor's called. Not really too big of deal if you know, but still annoying.

[edited by - Merick on April 12, 2004 11:56:50 AM]




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.