summaryrefslogtreecommitdiffstats
path: root/jwxyz/README
diff options
context:
space:
mode:
authorSimon Rettberg2018-10-16 10:08:48 +0200
committerSimon Rettberg2018-10-16 10:08:48 +0200
commitd3a98cf6cbc3bd0b9efc570f58e8812c03931c18 (patch)
treecbddf8e50f35a9c6e878a5bfe3c6d625d99e12ba /jwxyz/README
downloadxscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.gz
xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.tar.xz
xscreensaver-d3a98cf6cbc3bd0b9efc570f58e8812c03931c18.zip
Original 5.40
Diffstat (limited to 'jwxyz/README')
-rw-r--r--jwxyz/README30
1 files changed, 30 insertions, 0 deletions
diff --git a/jwxyz/README b/jwxyz/README
new file mode 100644
index 0000000..7c350bb
--- /dev/null
+++ b/jwxyz/README
@@ -0,0 +1,30 @@
+JWXYZ Is Not Xlib.
+
+But it's a bunch of function definitions that bear some resemblance to
+Xlib and that kinda sorta implement Xlib in terms of the native graphics
+substrate (Cocoa, OpenGL, GLES, Java).
+
+When porting XScreenSaver to other platforms, my goal is to keep a single
+code base that compiles for multiple platforms. That is, I don't want to
+end up with two different files that implement "Attraction" using different
+APIs or different languages,
+
+Since the vast majority of xscreensaver was originally written in C for
+the vintage-1985 X11 API and the vintage-1992 OpenGL API, this presents
+something of a challenge.
+
+ 1: To do the MacOS port, I implemented X11 in terms of Cocoa.
+ That's what jwxyz.m is.
+
+ 2: To do the iOS port, I used that X11/Cocoa layer from #1, but also
+ had to implement OpenGL 1.1 in terms of OpenGLES 1.0. That's what
+ jwzgles.c is. I have some things to say about that. You can
+ read it on my blog: http://jwz.org/b/yhM9
+
+ 3: To do the Android port, we used the OpenGL/OpenGLES layer from #2,
+ but implemented X11 in terms of OpenGL. That's what jwxyz-gl.c,
+ jwxyz-common.c and jwxyz-android.c are.
+
+Perhaps some day we can re-target MacOS and iOS at the OpenGL port of X11
+instead of the Cocoa port of X11, and replace jwxyz.m with jwxyz-gl.c and
+jwxyz-cocoa.m. That day has not yet arrived.