X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=README.hacking;h=718cae2b150804629081a0982048c5c2bfea079a;hp=9be7b88d697d780a58af705553dd3d897dec66ed;hb=5f9c47ca98dd43d8f59b7c27d3fde6edfde4fe21;hpb=50be9bb40dc60130c99ffa568e6677779904ff70 diff --git a/README.hacking b/README.hacking index 9be7b88d..718cae2b 100644 --- a/README.hacking +++ b/README.hacking @@ -5,6 +5,19 @@ ========================================================================== +Any program that can be made to render on an X window created by another +process can be used as a screen saver. Just get the window ID out of +$XSCREENSAVER_WINDOW, draw on that, and you're done. + +In theory, you can write a screen saver in any language you like. In +practice, however, languages other than C or C++ tend not to allow you to +draw to windows that they did not create themselves. Unfortunately, this +means that if you want to write a screen saver, you must write it in C. + +Given that you're going to be writing in C, you might as well take +advantage of the various utility functions that I have written to make +that easier. Writing a new screen saver in C using the frameworks +included with xscreensaver simplifies things enormously. Generally, the best way to learn how to do something is to find a similar program, and play around with it until you understand it. Another @@ -14,8 +27,8 @@ xscreensaver demos, included in the "hacks/" directory, rename the file, and edit it until it does what you want. The "Greynetic" and "Deluxe" hacks are probably good ones to start with, -since they are so very simple. For GL programs, "DangerBall" is a good -example. +since they are so very simple. For OpenGL programs, "DangerBall" is a +good example. ==========================================================================