Added comments, updated included header name gsoc2008_iphone
authorHolmes Futrell <hfutrell@umail.ucsb.edu>
Sat, 16 Aug 2008 00:08:10 +0000
branchgsoc2008_iphone
changeset 2444bf7028ffbf07
parent 2443 febfb349b467
child 2445 d65e44861a15
Added comments, updated included header name
src/video/uikit/SDL_uikitopengles.m
     1.1 --- a/src/video/uikit/SDL_uikitopengles.m	Fri Aug 15 23:53:04 2008 +0000
     1.2 +++ b/src/video/uikit/SDL_uikitopengles.m	Sat Aug 16 00:08:10 2008 +0000
     1.3 @@ -24,7 +24,7 @@
     1.4  #include "SDL_uikitopenglview.h"
     1.5  #include "SDL_uikitappdelegate.h"
     1.6  #include "SDL_uikitwindow.h"
     1.7 -#include "jump.h"
     1.8 +#include "jumphack.h"
     1.9  #include "SDL_sysvideo.h"
    1.10  #include "SDL_loadso.h"
    1.11  #include <dlfcn.h>
    1.12 @@ -61,7 +61,11 @@
    1.13  int
    1.14  UIKit_GL_LoadLibrary(_THIS, const char *path)
    1.15  {
    1.16 -	/* shouldn't be passing a path into this function */
    1.17 +	/* 
    1.18 +		shouldn't be passing a path into this function 
    1.19 +		why?  Because we've already loaded the library
    1.20 +		and because the SDK forbids loading an external SO
    1.21 +	*/
    1.22      if (path != NULL) {
    1.23  		SDL_SetError("iPhone GL Load Library just here for compatibility");
    1.24  		return -1;
    1.25 @@ -95,6 +99,7 @@
    1.26  
    1.27  	SDL_WindowData *data = (SDL_WindowData *)window->driverdata;
    1.28  	
    1.29 +	/* construct our view, passing in SDL's OpenGL configuration data */
    1.30  	view = [[SDL_uikitopenglview alloc] initWithFrame: [[UIScreen mainScreen] applicationFrame] \
    1.31  									retainBacking: _this->gl_config.retained_backing \
    1.32  									rBits: _this->gl_config.red_size \
    1.33 @@ -102,11 +107,10 @@
    1.34  									bBits: _this->gl_config.blue_size \
    1.35  									aBits: _this->gl_config.alpha_size \
    1.36  									depthBits: _this->gl_config.depth_size];
    1.37 -
    1.38 -	view.multipleTouchEnabled = YES;
    1.39 -
    1.40 +	
    1.41  	data->view = view;
    1.42 -
    1.43 +	
    1.44 +	/* add the view to our window */
    1.45  	[data->uiwindow addSubview: view ];
    1.46  	
    1.47  	/* Don't worry, the window retained the view */