annotate src/video/uikit/SDL_uikitopenglview.m @ 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 e103b316a4ef
rev   line source
2351
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
1 //
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
2 // EAGLView.m
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
3 // test2
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
4 //
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
5 // Created by Holmes Futrell on 7/11/08.
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
6 // Copyright __MyCompanyName__ 2008. All rights reserved.
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
7 //
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
8
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
9
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
10
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
11 #import <QuartzCore/QuartzCore.h>
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
12 #import <OpenGLES/EAGLDrawable.h>
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
13
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
14 #import "SDL_uikitopenglview.h"
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
15
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
16 // A class extension to declare private methods
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
17 @interface SDL_uikitopenglview (privateMethods)
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
18
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
19 - (BOOL) createFramebuffer;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
20 - (void) destroyFramebuffer;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
21
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
22 @end
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
23
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
24
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
25 @implementation SDL_uikitopenglview
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
26
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
27 @synthesize context;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
28 // You must implement this
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
29 + (Class)layerClass {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
30 return [CAEAGLLayer class];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
31 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
32
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
33 /*
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
34 stencilBits ignored.
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
35 Right now iPhone stencil buffer doesn't appear supported. Maybe it will be in the future ... who knows.
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
36 */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
37 - (id)initWithFrame:(CGRect)frame \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
38 retainBacking:(BOOL)retained \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
39 rBits:(int)rBits \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
40 gBits:(int)gBits \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
41 bBits:(int)bBits \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
42 aBits:(int)aBits \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
43 depthBits:(int)depthBits \
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
44 {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
45
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
46 NSString *colorFormat=nil;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
47 GLuint depthBufferFormat;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
48 BOOL useDepthBuffer;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
49
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
50 if (rBits == 8 && gBits == 8 && bBits == 8) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
51 /* if user specifically requests rbg888 or some color format higher than 16bpp */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
52 colorFormat = kEAGLColorFormatRGBA8;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
53 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
54 else {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
55 /* default case (faster) */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
56 colorFormat = kEAGLColorFormatRGB565;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
57 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
58
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
59 if (depthBits == 24) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
60 useDepthBuffer = YES;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
61 depthBufferFormat = GL_DEPTH_COMPONENT24_OES;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
62 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
63 else if (depthBits == 0) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
64 useDepthBuffer = NO;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
65 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
66 else {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
67 /* default case when depth buffer is not disabled */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
68 /*
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
69 strange, even when we use this, we seem to get a 24 bit depth buffer on iPhone.
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
70 perhaps that's the only depth format iPhone actually supports
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
71 */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
72 useDepthBuffer = YES;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
73 depthBufferFormat = GL_DEPTH_COMPONENT16_OES;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
74 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
75
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
76 if ((self = [super initWithFrame:frame])) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
77 // Get the layer
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
78 CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
79
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
80 eaglLayer.opaque = YES;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
81 eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
82 [NSNumber numberWithBool: retained], kEAGLDrawablePropertyRetainedBacking, colorFormat, kEAGLDrawablePropertyColorFormat, nil];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
83
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
84 context = [[EAGLContext alloc] initWithAPI: kEAGLRenderingAPIOpenGLES1];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
85
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
86 if (!context || ![EAGLContext setCurrentContext:context]) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
87 [self release];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
88 return nil;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
89 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
90
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
91 /* create the buffers */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
92 glGenFramebuffersOES(1, &viewFramebuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
93 glGenRenderbuffersOES(1, &viewRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
94
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
95 glBindFramebufferOES(GL_FRAMEBUFFER_OES, viewFramebuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
96 glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
97 [context renderbufferStorage:GL_RENDERBUFFER_OES fromDrawable:(CAEAGLLayer*)self.layer];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
98 glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES, GL_RENDERBUFFER_OES, viewRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
99
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
100 glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_WIDTH_OES, &backingWidth);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
101 glGetRenderbufferParameterivOES(GL_RENDERBUFFER_OES, GL_RENDERBUFFER_HEIGHT_OES, &backingHeight);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
102
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
103 if (useDepthBuffer) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
104 glGenRenderbuffersOES(1, &depthRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
105 glBindRenderbufferOES(GL_RENDERBUFFER_OES, depthRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
106 glRenderbufferStorageOES(GL_RENDERBUFFER_OES, depthBufferFormat, backingWidth, backingHeight);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
107 glFramebufferRenderbufferOES(GL_FRAMEBUFFER_OES, GL_DEPTH_ATTACHMENT_OES, GL_RENDERBUFFER_OES, depthRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
108 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
109
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
110 if(glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES) != GL_FRAMEBUFFER_COMPLETE_OES) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
111 NSLog(@"failed to make complete framebuffer object %x", glCheckFramebufferStatusOES(GL_FRAMEBUFFER_OES));
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
112 return NO;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
113 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
114 /* end create buffers */
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
115
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
116 NSLog(@"Done initializing ...");
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
117
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
118 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
119 return self;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
120 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
121
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
122 - (void)setCurrentContext {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
123 [EAGLContext setCurrentContext:context];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
124 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
125
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
126
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
127 - (void)swapBuffers {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
128
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
129
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
130 glBindRenderbufferOES(GL_RENDERBUFFER_OES, viewRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
131 if (![context presentRenderbuffer:GL_RENDERBUFFER_OES]) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
132 NSLog(@"Could not swap buffers");
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
133 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
134 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
135
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
136
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
137 - (void)layoutSubviews {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
138 [EAGLContext setCurrentContext:context];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
139 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
140
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
141 - (void)destroyFramebuffer {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
142
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
143 glDeleteFramebuffersOES(1, &viewFramebuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
144 viewFramebuffer = 0;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
145 glDeleteRenderbuffersOES(1, &viewRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
146 viewRenderbuffer = 0;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
147
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
148 if (depthRenderbuffer) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
149 glDeleteRenderbuffersOES(1, &depthRenderbuffer);
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
150 depthRenderbuffer = 0;
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
151 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
152 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
153
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
154
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
155 - (void)dealloc {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
156
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
157 [self destroyFramebuffer];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
158 if ([EAGLContext currentContext] == context) {
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
159 [EAGLContext setCurrentContext:nil];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
160 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
161 [context release];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
162 [super dealloc];
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
163
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
164 }
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
165
d2a519d2cc57 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.
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
diff changeset
166 @end