summaryrefslogtreecommitdiffstats
path: root/jwxyz/jwxyz-gl.c
diff options
context:
space:
mode:
Diffstat (limited to 'jwxyz/jwxyz-gl.c')
-rw-r--r--jwxyz/jwxyz-gl.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/jwxyz/jwxyz-gl.c b/jwxyz/jwxyz-gl.c
index f1c13da..ed4c9c9 100644
--- a/jwxyz/jwxyz-gl.c
+++ b/jwxyz/jwxyz-gl.c
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2018 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2020 Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
@@ -11,14 +11,14 @@
/* JWXYZ Is Not Xlib.
- But it's a bunch of function definitions that bear some resemblance to
- Xlib and that do OpenGL-ish things that bear some resemblance to the
- things that Xlib might have done.
+ Pixmaps implemented in terms of OpenGL textures, for Android X11 hacks.
+ Maybe this can someday be used on macOS and iOS as well.
- This is the version of jwxyz for Android. The version used by macOS
- and iOS is in jwxyz.m.
+ See the comment at the top of jwxyz-common.c for an explanation of
+ the division of labor between these various modules.
*/
+
/* Be advised, this is all very much a work in progress. */
/* There is probably no reason to ever implement indexed-color rendering here,
@@ -77,7 +77,7 @@
#include <wchar.h>
#ifdef HAVE_COCOA
-# ifdef USE_IPHONE
+# ifdef HAVE_IPHONE
# import <QuartzCore/QuartzCore.h>
# include <OpenGLES/ES1/gl.h>
# include <OpenGLES/ES1/glext.h>
@@ -91,6 +91,9 @@
# else
# include <GLES/gl.h>
# include <GLES/glext.h>
+# ifdef HAVE_GLES3
+# include <GLES3/gl3.h>
+# endif
# endif
#endif
@@ -186,7 +189,7 @@ jwxyz_set_matrices (Display *dpy, unsigned width, unsigned height,
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
-# if defined(USE_IPHONE) || defined(HAVE_ANDROID)
+# if defined(HAVE_IPHONE) || defined(HAVE_ANDROID)
if (window_p && ignore_rotation_p(dpy)) {
int o = (int) current_device_rotation();
@@ -917,7 +920,7 @@ jwxyz_gl_copy_area_read_tex_image (Display *dpy, unsigned src_height,
unsigned int width, unsigned int height,
int dst_x, int dst_y)
{
-# if defined HAVE_COCOA && !defined USE_IPHONE
+# if defined HAVE_COCOA && !defined HAVE_IPHONE
/* TODO: Does this help? */
/* glFinish(); */
# endif