src/video/uikit/SDL_uikitopenglview.m
branchgsoc2008_iphone
changeset 2445 d65e44861a15
parent 2425 491958a6c881
equal deleted inserted replaced
2444:bf7028ffbf07 2445:d65e44861a15
    22 
    22 
    23 #import <QuartzCore/QuartzCore.h>
    23 #import <QuartzCore/QuartzCore.h>
    24 #import <OpenGLES/EAGLDrawable.h>
    24 #import <OpenGLES/EAGLDrawable.h>
    25 #import "SDL_uikitopenglview.h"
    25 #import "SDL_uikitopenglview.h"
    26 
    26 
    27 // A class extension to declare private methods
       
    28 @interface SDL_uikitopenglview (privateMethods)
    27 @interface SDL_uikitopenglview (privateMethods)
    29 
    28 
    30 - (BOOL) createFramebuffer;
    29 - (BOOL) createFramebuffer;
    31 - (void) destroyFramebuffer;
    30 - (void) destroyFramebuffer;
    32 
    31 
    34 
    33 
    35 
    34 
    36 @implementation SDL_uikitopenglview
    35 @implementation SDL_uikitopenglview
    37 
    36 
    38 @synthesize context;
    37 @synthesize context;
    39 // You must implement this
    38 
    40 + (Class)layerClass {
    39 + (Class)layerClass {
    41 	return [CAEAGLLayer class];
    40 	return [CAEAGLLayer class];
    42 }
    41 }
    43 
    42 
    44 /*
       
    45 	stencilBits ignored.
       
    46 	Right now iPhone stencil buffer doesn't appear supported.  Maybe it will be in the future ... who knows.
       
    47 */
       
    48 - (id)initWithFrame:(CGRect)frame \
    43 - (id)initWithFrame:(CGRect)frame \
    49 	  retainBacking:(BOOL)retained \
    44 	  retainBacking:(BOOL)retained \
    50 	  rBits:(int)rBits \
    45 	  rBits:(int)rBits \
    51 	  gBits:(int)gBits \
    46 	  gBits:(int)gBits \
    52 	  bBits:(int)bBits \
    47 	  bBits:(int)bBits \