comparison src/video/uikit/SDL_uikitopenglview.h @ 2351:d2a519d2cc57 gsoc2008_iphone

SDL_uikitopenglview is an OpenGL ES View class based on the one found in Apple's OpenGL ES based application template. It's created from SDL_uikitopengles.m, normally.
author Holmes Futrell <hfutrell@umail.ucsb.edu>
date Thu, 17 Jul 2008 22:35:59 +0000
parents
children e9a1eed243c9
comparison
equal deleted inserted replaced
2350:eb828d6c3efb 2351:d2a519d2cc57
1 //
2 // EAGLView.h
3 // test2
4 //
5 // Created by Holmes Futrell on 7/11/08.
6 // Copyright __MyCompanyName__ 2008. All rights reserved.
7 //
8
9
10 #import <UIKit/UIKit.h>
11 #import <OpenGLES/EAGL.h>
12 #import <OpenGLES/ES1/gl.h>
13 #import <OpenGLES/ES1/glext.h>
14 #import "SDL_uikitview.h"
15 /*
16 This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
17 The view content is basically an EAGL surface you render your OpenGL scene into.
18 Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
19 */
20 @interface SDL_uikitopenglview : SDL_uikitview {
21
22 @private
23 /* The pixel dimensions of the backbuffer */
24 GLint backingWidth;
25 GLint backingHeight;
26
27 EAGLContext *context;
28
29 /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
30 GLuint viewRenderbuffer, viewFramebuffer;
31
32 /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
33 GLuint depthRenderbuffer;
34
35 }
36
37 @property (nonatomic, retain, readonly) EAGLContext *context;
38
39 - (void)swapBuffers;
40 - (void)setCurrentContext;
41
42 - (id)initWithFrame:(CGRect)frame
43 retainBacking:(BOOL)retained \
44 rBits:(int)rBits \
45 gBits:(int)gBits \
46 bBits:(int)bBits \
47 aBits:(int)aBits \
48 depthBits:(int)depthBits;
49
50 @end