to use scrnsave.lib or not?

Started by
2 comments, last by Raloth 20 years ago
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?
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
Advertisement
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...
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])
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
Brianmiserere nostri Domine miserere nostri
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]
-----BEGIN PGP SIGNATURE-----iQA/AwUBOwgpXBtK1gxlCl8XEQIZDACeOhJi6KLEz+rHAI4PiXt9Nw/qFswAoPigEJoSGWopzBZ6V2H1zLECKT8T=CImp-----END PGP SIGNATURE-----

This topic is closed to new replies.

Advertisement