summaryrefslogtreecommitdiffstats
path: root/README.hacking
diff options
context:
space:
mode:
authorSimon Rettberg2021-04-06 14:43:39 +0200
committerSimon Rettberg2021-04-07 13:38:37 +0200
commit38886de0c3e9ea5729ef23e4c653fa2822f52e8f (patch)
tree9b799c8c968a92cc77746a95e0e8bdd90b6b13c3 /README.hacking
parentMaybe not remove, but ... (diff)
downloadxscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.tar.gz
xscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.tar.xz
xscreensaver-38886de0c3e9ea5729ef23e4c653fa2822f52e8f.zip
xscreensaver 6.00v28r1openslx
Diffstat (limited to 'README.hacking')
-rw-r--r--README.hacking35
1 files changed, 35 insertions, 0 deletions
diff --git a/README.hacking b/README.hacking
index f2958b4..39f9e14 100644
--- a/README.hacking
+++ b/README.hacking
@@ -50,6 +50,11 @@ Requirements for inclusion with the XScreenSaver collection
your name and the current year). The GNU GPL is not compatible with
the rest of XScreenSaver.
+ - No clocks! Just as time travellers always try to kill Hitler on their
+ first trip, everyone seems to think that their first screen saver
+ should be a clock of some kind. Nobody needs to know what time it is
+ with such frequency. Fight The Tyranny Of The Clock.
+
==========================================================================
The XScreenSaver API
@@ -184,6 +189,10 @@ Programming Tips
in long-lived processes where no such cleanup takes place.
Consider Valgrind or gcc -fsanitize=leak to find memory leaks.
+ - Again, don't use global variables. If you are doing your developent
+ under X11, test your saver from the command line with the "-pair"
+ argument. If that crashes, you're using global variables!
+
==========================================================================
macOS, iOS and Android
@@ -201,4 +210,30 @@ macOS, iOS and Android
To check that an X11 saver will fit well on a mobile device, test it
with -geometry 640x1136 and 640x960. That's a good first step, anyway.
+
+==========================================================================
+Theory behind the ifdefs
+==========================================================================
+
+ HAVE_ macros indicate that an API is available.
+ USE_ macros indicate that a feature is requested.
+
+ Some notable ones:
+
+ HAVE_GL The OpenGL 1.3 API is available, natively or through emulation.
+ HAVE_GLES The OpenGLES 1.x API is available.
+ HAVE_COCOA The Cocoa API is available, meaning compiling for macOS or iOS.
+ HAVE_IPHONE Compiling for iOS, including iPad.
+ HAVE_ANDROID Compiling for Android.
+ HAVE_MOBILE iOS or Android, typically used for things related to rotation
+ or screen size that apply to all phones and tablets.
+ HAVE_JWXYZ Compiling on a system where the X11 API is emulated
+ (macOS, iOS or Android).
+ HAVE_JWZGLES Compiling on a system where the OpenGL 1.3 API is emulated
+ (iOS, Android, possibly Linux).
+ HAVE_GLSL Compiling against a library that supports the GL Shading
+ Language. Note that using GLSL also requires a runtime check
+ to see which version of GLSL the *running* system supports.
+ HAVE_EGL OpenGL interfaces with native windows via EGL instead of GLX.
+
==========================================================================