Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AppImplCocoaTouchRendererGl.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2010, The Barbarian Group
3  All rights reserved.
4 
5  Redistribution and use in source and binary forms, with or without modification, are permitted provided that
6  the following conditions are met:
7 
8  * Redistributions of source code must retain the above copyright notice, this list of conditions and
9  the following disclaimer.
10  * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
11  the following disclaimer in the documentation and/or other materials provided with the distribution.
12 
13  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
14  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
15  PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
16  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
17  TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
18  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
19  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
20  POSSIBILITY OF SUCH DAMAGE.
21 */
22 
23 #import <UIKit/UIKit.h>
24 
25 #import "cinder/app/App.h"
26 #import "cinder/app/Renderer.h"
27 
28 @interface AppImplCocoaTouchRendererGl : NSObject
29 {
30  cinder::app::RendererGl *mRenderer; // equivalent of a weak_ptr; 'renderer' owns this // TODO: remove, this is unused
32  UIView *mCinderView;
33  EAGLContext *mContext;
34 
35  // The pixel dimensions of the CAEAGLLayer
37 
38  // The dimensions of the CAEAGLLayer in points
40 
41  // The OpenGL names for the framebuffer and renderbuffer used to render to this view
44  BOOL mUsingMsaa;
46 }
47 
48 - (id)initWithFrame:(CGRect)frame cinderView:(UIView*)aCinderView app:(cinder::app::App*)aApp renderer:(cinder::app::RendererGl*)aRenderer sharedRenderer:(cinder::app::RendererGlRef)sharedRenderer;
49 
50 - (EAGLContext*)getEaglContext;
51 - (void)makeCurrentContext;
52 - (void)flushBuffer;
53 - (void)setFrameSize:(CGSize)newSize;
54 - (void)defaultResize;
55 
56 - (BOOL)needsDrawRect;
57 
58 @end
BOOL mUsingMsaa
Definition: AppImplCocoaTouchRendererGl.h:44
GLuint mViewRenderBuffer
Definition: AppImplCocoaTouchRendererGl.h:42
Definition: Renderer.h:147
std::shared_ptr< class RendererGl > RendererGlRef
Definition: Renderer.h:146
cinder::app::App * mApp
Definition: AppImplCocoaTouchRendererGl.h:31
GLuint mDepthRenderBuffer
Definition: AppImplCocoaTouchRendererGl.h:42
typedef void(APIENTRYP GLEEPFNGLBLENDCOLORPROC)(GLclampf red
GLint mPointsHeight
Definition: AppImplCocoaTouchRendererGl.h:39
unsigned int GLuint
Definition: gldx.h:55
GLuint mMsaaFramebuffer
Definition: AppImplCocoaTouchRendererGl.h:43
GLint mPointsWidth
Definition: AppImplCocoaTouchRendererGl.h:39
Definition: App.h:127
EAGLContext * mContext
Definition: AppImplCocoaTouchRendererGl.h:33
UIView * mCinderView
Definition: AppImplCocoaTouchRendererGl.h:32
GLuint mMsaaRenderBuffer
Definition: AppImplCocoaTouchRendererGl.h:43
GLint mBackingHeight
Definition: AppImplCocoaTouchRendererGl.h:36
int GLint
Definition: gldx.h:51
GLuint id
Definition: GLee.h:2035
GLuint mViewFramebuffer
Definition: AppImplCocoaTouchRendererGl.h:42
GLint mBackingWidth
Definition: AppImplCocoaTouchRendererGl.h:36
Definition: AppImplCocoaTouchRendererGl.h:28
int mMsaaSamples
Definition: AppImplCocoaTouchRendererGl.h:45
cinder::app::RendererGl * mRenderer
Definition: AppImplCocoaTouchRendererGl.h:30