X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=jwxyz%2FREADME;fp=jwxyz%2FREADME;h=7c350bb112074382aaaa0a53e93384c5a3c55b51;hp=0000000000000000000000000000000000000000;hb=aa75c7476aeaa84cf3abc192b376a8b03c325213;hpb=88cfe534a698a0562e81345957a50714af1453bc diff --git a/jwxyz/README b/jwxyz/README new file mode 100644 index 00000000..7c350bb1 --- /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.