From http://www.jwz.org/xscreensaver/xscreensaver-5.40.tar.gz
[xscreensaver] / jwxyz / jwzgles.c
index 3df134ab003e41d56fb39a0be514c7ef9f444e44..e0437e06eb530a323adf0e9157fbb5b55c31e32c 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2012-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2012-2018 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
@@ -3084,6 +3084,25 @@ jwzgles_glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat,
 }
 
 
+void
+jwzgles_glCopyTexSubImage2D (GLenum target, GLint level, 
+                             GLint xoff, GLint yoff, 
+                             GLint x, GLint y, 
+                             GLsizei width, GLsizei height)
+{
+  Assert (!state->compiling_verts, 
+          "glCopyTexSubImage2D not allowed inside glBegin");
+  Assert (!state->compiling_list,    /* technically legal, but stupid! */
+          "glCopyTexSubImage2D not allowed inside glNewList");
+  if (! state->replaying_list)
+    LOG9 ("direct %-12s %s %d %d %d %d %d %d %d", "glCopyTexSubImage2D", 
+          mode_desc(target), level, xoff, yoff, x, y, width, height);
+  glCopyTexSubImage2D (target, level,   /* the real one */
+                       xoff, yoff, x, y, width, height);
+  CHECK("glCopyTexSubImage2D");
+}
+
+
 /* OpenGLES doesn't have auto texture-generation at all!
    "Oh, just rewrite that code to use GPU shaders", they say.
    How fucking convenient.