-/* xscreensaver, Copyright (c) 2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2012 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
*/
#import "XScreenSaverView.h"
-#import <AGL/agl.h>
+
+#ifdef USE_IPHONE
+# import <OpenGLES/EAGL.h>
+# import <OpenGLES/ES1/gl.h>
+# import <OpenGLES/ES1/glext.h>
+# import <QuartzCore/QuartzCore.h>
+# define NSOpenGLContext EAGLContext
+#else
+# import <AppKit/NSOpenGL.h>
+#endif
@interface XScreenSaverGLView : XScreenSaverView
{
- AGLContext agl_ctx; // OpenGL rendering context
+ NSOpenGLContext *ogl_ctx; // OpenGL rendering context
+
+# ifdef USE_IPHONE
+ GLuint gl_framebuffer, gl_renderbuffer, gl_depthbuffer;
+# endif /* USE_IPHONE */
}
@end