annotate 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
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.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
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 #import <UIKit/UIKit.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
11 #import <OpenGLES/EAGL.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/ES1/gl.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 #import <OpenGLES/ES1/glext.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
14 #import "SDL_uikitview.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 This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
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 The view content is basically an EAGL surface you render your OpenGL scene into.
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 Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
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 */
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 @interface SDL_uikitopenglview : SDL_uikitview {
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 @private
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 /* The pixel dimensions of the backbuffer */
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 GLint 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
25 GLint 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
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 EAGLContext *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
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 /* OpenGL names for the renderbuffer and framebuffers used to render to this view */
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 GLuint viewRenderbuffer, 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
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 /* OpenGL name for the depth buffer that is attached to viewFramebuffer, if it exists (0 if it does not exist) */
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 GLuint 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
34
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 }
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 @property (nonatomic, retain, readonly) EAGLContext *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
38
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 - (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
40 - (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
41
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 - (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
43 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
44 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
45 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
46 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
47 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
48 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
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 @end