Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added comments, updated included header name
Browse files Browse the repository at this point in the history
  • Loading branch information
Holmes Futrell committed Aug 16, 2008
1 parent 2bf95be commit 2bb190a
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/video/uikit/SDL_uikitopengles.m
Expand Up @@ -24,7 +24,7 @@
#include "SDL_uikitopenglview.h"
#include "SDL_uikitappdelegate.h"
#include "SDL_uikitwindow.h"
#include "jump.h"
#include "jumphack.h"
#include "SDL_sysvideo.h"
#include "SDL_loadso.h"
#include <dlfcn.h>
Expand Down Expand Up @@ -61,7 +61,11 @@ int UIKit_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
int
UIKit_GL_LoadLibrary(_THIS, const char *path)
{
/* shouldn't be passing a path into this function */
/*
shouldn't be passing a path into this function
why? Because we've already loaded the library
and because the SDK forbids loading an external SO
*/
if (path != NULL) {
SDL_SetError("iPhone GL Load Library just here for compatibility");
return -1;
Expand Down Expand Up @@ -95,18 +99,18 @@ SDL_GLContext UIKit_GL_CreateContext(_THIS, SDL_Window * window)

SDL_WindowData *data = (SDL_WindowData *)window->driverdata;

/* construct our view, passing in SDL's OpenGL configuration data */
view = [[SDL_uikitopenglview alloc] initWithFrame: [[UIScreen mainScreen] applicationFrame] \
retainBacking: _this->gl_config.retained_backing \
rBits: _this->gl_config.red_size \
gBits: _this->gl_config.green_size \
bBits: _this->gl_config.blue_size \
aBits: _this->gl_config.alpha_size \
depthBits: _this->gl_config.depth_size];

view.multipleTouchEnabled = YES;


data->view = view;


/* add the view to our window */
[data->uiwindow addSubview: view ];

/* Don't worry, the window retained the view */
Expand Down

0 comments on commit 2bb190a

Please sign in to comment.