23 #if SDL_VIDEO_DRIVER_UIKIT
30 #include "../SDL_sysvideo.h"
31 #include "../../events/SDL_keyboard_c.h"
32 #include "../../events/SDL_mouse_c.h"
33 #include "../../power/uikit/SDL_syspower.h"
37 static int UIKit_GL_Initialize(
_THIS);
46 return dlsym(RTLD_DEFAULT, proc);
56 [data->
view setCurrentContext];
59 [EAGLContext setCurrentContext: nil];
74 return SDL_SetError(
"iPhone GL Load Library just here for compatibility");
83 SDL_UIKit_UpdateBatteryMonitoring();
91 [data->view swapBuffers];
106 UIWindow *uiwindow = data->
uiwindow;
107 EAGLSharegroup *share_group = nil;
111 share_group = [view.context sharegroup];
117 frame = [displaydata->uiscreen bounds];
119 frame = [displaydata->uiscreen applicationFrame];
122 scale: displaymodedata->scale
123 retainBacking: _this->gl_config.retained_backing
124 rBits: _this->gl_config.red_size
125 gBits: _this->gl_config.green_size
126 bBits: _this->gl_config.blue_size
127 aBits: _this->gl_config.alpha_size
128 depthBits: _this->gl_config.depth_size
129 stencilBits: _this->gl_config.stencil_size
130 majorVersion: _this->gl_config.major_version
131 shareGroup: share_group];
139 [view->viewcontroller setView:view];
140 [view->viewcontroller retain];
142 [uiwindow addSubview: view];
145 if (uiwindow.rootViewController == nil) {
155 if (displaydata->
uiscreen == [UIScreen mainScreen]) {
168 UIWindow *uiwindow = (UIWindow *)view.superview;
170 uiwindow.rootViewController = nil;
172 [view->viewcontroller setView:nil];
173 [view->viewcontroller release];
175 [view removeFromSuperview];
SDL_uikitviewcontroller * viewcontroller
void SDL_SetKeyboardFocus(SDL_Window *window)
void UIKit_GL_DeleteContext(_THIS, SDL_GLContext context)
SDL_uikitviewcontroller * viewcontroller
void * SDL_GLContext
An opaque handle to an OpenGL context.
void SDL_SetMouseFocus(SDL_Window *window)
int UIKit_GL_LoadLibrary(_THIS, const char *path)
GLsizei const GLchar *const * path
static SDL_VideoDevice * _this
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
DECLSPEC int SDLCALL SDL_SetError(const char *fmt,...)
void UIKit_GL_SwapWindow(_THIS, SDL_Window *window)
SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window *window)
int share_with_current_context
void * UIKit_GL_GetProcAddress(_THIS, const char *proc)
SDL_VideoDisplay * SDL_GetDisplayForWindow(SDL_Window *window)
struct SDL_VideoDevice::@87 gl_config
int UIKit_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context)
DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void)
Get the currently active OpenGL context.
SDL_uikitopenglview * view