+++ /dev/null
-#include <android/log.h>
-#include "screenhackI.h"
-#include "xlockmoreI.h"
-
-#if defined(USE_IPHONE) || (HAVE_ANDROID)
-# include "jwzgles.h"
-#else
-# include <OpenGL/OpenGL.h>
-#endif
-
-/* used by the OpenGL screen savers
- */
-extern GLXContext *init_GL (ModeInfo *);
-extern void glXSwapBuffers (Display *, Window);
-extern void glXMakeCurrent (Display *, Window, GLXContext);
-extern void clear_gl_error (void);
-extern void check_gl_error (const char *type);
-
-/* Does nothing - prepareContext already did the work.
- */
-void
-glXMakeCurrent (Display *dpy, Window window, GLXContext context)
-{
-}
-
-
-/* clear away any lingering error codes */
-void
-clear_gl_error (void)
-{
- while (glGetError() != GL_NO_ERROR)
- ;
-}
-
-
-// needs to be implemented in Android...
-/* Copy the back buffer to the front buffer.
- */
-void
-glXSwapBuffers (Display *dpy, Window window)
-{
-}
-
-
-/* Called by OpenGL savers using the XLockmore API.
- */
-GLXContext *
-init_GL (ModeInfo *mi)
-{
- Window win = mi->window;
-
- // Caller expects a pointer to an opaque struct... which it dereferences.
- // Don't ask me, it's historical...
- static int blort = -1;
- return (void *) &blort;
-}
-
-/* report a GL error. */
-void
-check_gl_error (const char *type)
-{
- char buf[100];
- GLenum i;
- const char *e;
- switch ((i = glGetError())) {
- case GL_NO_ERROR: return;
- case GL_INVALID_ENUM: e = "invalid enum"; break;
- case GL_INVALID_VALUE: e = "invalid value"; break;
- case GL_INVALID_OPERATION: e = "invalid operation"; break;
- case GL_STACK_OVERFLOW: e = "stack overflow"; break;
- case GL_STACK_UNDERFLOW: e = "stack underflow"; break;
- case GL_OUT_OF_MEMORY: e = "out of memory"; break;
-#ifdef GL_TABLE_TOO_LARGE_EXT
- case GL_TABLE_TOO_LARGE_EXT: e = "table too large"; break;
-#endif
-#ifdef GL_TEXTURE_TOO_LARGE_EXT
- case GL_TEXTURE_TOO_LARGE_EXT: e = "texture too large"; break;
-#endif
- default:
- e = buf; sprintf (buf, "unknown GL error %d", (int) i); break;
- }
- __android_log_write(ANDROID_LOG_ERROR, "xscreensaver", e);
-}
-