src/video/uikit/SDL_uikitopenglview.h
branchiOS-improvements
changeset 9501 574db299498f
parent 9498 d02c27e3f698
child 9510 e19faa3b5d88
equal deleted inserted replaced
9500:cbf5c5ecf5ac 9501:574db299498f
    27 /*
    27 /*
    28     This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
    28     This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
    29     The view content is basically an EAGL surface you render your OpenGL scene into.
    29     The view content is basically an EAGL surface you render your OpenGL scene into.
    30     Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
    30     Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
    31  */
    31  */
    32 @interface SDL_uikitopenglview : SDL_uikitview {
    32 @interface SDL_uikitopenglview : SDL_uikitview
    33 
       
    34 @private
       
    35     /* The pixel dimensions of the backbuffer */
       
    36     GLint backingWidth;
       
    37     GLint backingHeight;
       
    38 
       
    39     EAGLContext *context;
       
    40 
       
    41     /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
       
    42     GLuint viewRenderbuffer, viewFramebuffer;
       
    43 
       
    44     /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
       
    45     GLuint depthRenderbuffer;
       
    46 
       
    47     /* format of depthRenderbuffer */
       
    48     GLenum depthBufferFormat;
       
    49 
       
    50     id displayLink;
       
    51     int animationInterval;
       
    52     void (*animationCallback)(void*);
       
    53     void *animationCallbackParam;
       
    54 }
       
    55 
       
    56 @property (nonatomic, retain, readonly) EAGLContext *context;
       
    57 
       
    58 /* The width and height of the drawable in pixels (as opposed to points.) */
       
    59 @property (nonatomic, readonly) int backingWidth;
       
    60 @property (nonatomic, readonly) int backingHeight;
       
    61 
       
    62 - (void)swapBuffers;
       
    63 - (void)setCurrentContext;
       
    64 
    33 
    65 - (id)initWithFrame:(CGRect)frame
    34 - (id)initWithFrame:(CGRect)frame
    66               scale:(CGFloat)scale
    35               scale:(CGFloat)scale
    67       retainBacking:(BOOL)retained
    36       retainBacking:(BOOL)retained
    68               rBits:(int)rBits
    37               rBits:(int)rBits
    73         stencilBits:(int)stencilBits
    42         stencilBits:(int)stencilBits
    74                sRGB:(BOOL)sRGB
    43                sRGB:(BOOL)sRGB
    75        majorVersion:(int)majorVersion
    44        majorVersion:(int)majorVersion
    76          shareGroup:(EAGLSharegroup*)shareGroup;
    45          shareGroup:(EAGLSharegroup*)shareGroup;
    77 
    46 
       
    47 @property (nonatomic, retain, readonly) EAGLContext *context;
       
    48 
       
    49 /* The width and height of the drawable in pixels (as opposed to points.) */
       
    50 @property (nonatomic, readonly) int backingWidth;
       
    51 @property (nonatomic, readonly) int backingHeight;
       
    52 
       
    53 - (void)swapBuffers;
       
    54 - (void)setCurrentContext;
       
    55 
    78 - (void)updateFrame;
    56 - (void)updateFrame;
    79 
    57 
    80 - (void)setAnimationCallback:(int)interval
    58 - (void)setAnimationCallback:(int)interval
    81     callback:(void (*)(void*))callback
    59                     callback:(void (*)(void*))callback
    82     callbackParam:(void*)callbackParam;
    60                callbackParam:(void*)callbackParam;
    83 
    61 
    84 - (void)startAnimation;
    62 - (void)startAnimation;
    85 - (void)stopAnimation;
    63 - (void)stopAnimation;
    86 
    64 
    87 - (void)doLoop:(CADisplayLink*)sender;
    65 - (void)doLoop:(CADisplayLink*)sender;