3 But it's a bunch of function definitions that bear some resemblance to
4 Xlib and that kinda sorta implement Xlib in terms of the native graphics
5 substrate (Cocoa, OpenGL, GLES, Java).
7 When porting XScreenSaver to other platforms, my goal is to keep a single
8 code base that compiles for multiple platforms. That is, I don't want to
9 end up with two different files that implement "Attraction" using different
10 APIs or different languages,
12 Since the vast majority of xscreensaver was originally written in C for
13 the vintage-1985 X11 API and the vintage-1992 OpenGL API, this presents
14 something of a challenge.
16 1: To do the MacOS port, I implemented X11 in terms of Cocoa.
17 That's what jwxyz.m is.
19 2: To do the iOS port, I used that X11/Cocoa layer from #1, but also
20 had to implement OpenGL 1.1 in terms of OpenGLES 1.0. That's what
21 jwzgles.c is. I have some things to say about that. You can
22 read it on my blog: http://jwz.org/b/yhM9
24 3: To do the Android port, we used the OpenGL/OpenGLES layer from #2,
25 but implemented X11 in terms of OpenGL. That's what jwxyz-gl.c,
26 jwxyz-common.c and jwxyz-android.c are.
28 Perhaps some day we can re-target MacOS and iOS at the OpenGL port of X11
29 instead of the Cocoa port of X11, and replace jwxyz.m with jwxyz-gl.c and
30 jwxyz-cocoa.m. That day has not yet arrived.