diff options
author | Yury Melnichek <melnichek@gmail.com> | 2011-03-15 16:03:01 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:13:40 +0300 |
commit | a48a5b2fec1ebbfee809fdd56f7d0516ce6726ca (patch) | |
tree | 4f115427f073bd20546fc03da6a519a60493e587 /iphone/Maps/Classes/EAGLView.h | |
parent | a98c3ead64d91bcabaf1657a53c7fcaa004abf6e (diff) |
Rename Objective-C files from .hpp to .h, use #include for hpp and import for h.
Diffstat (limited to 'iphone/Maps/Classes/EAGLView.h')
-rw-r--r-- | iphone/Maps/Classes/EAGLView.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/iphone/Maps/Classes/EAGLView.h b/iphone/Maps/Classes/EAGLView.h new file mode 100644 index 0000000000..ff9b0e7938 --- /dev/null +++ b/iphone/Maps/Classes/EAGLView.h @@ -0,0 +1,65 @@ +// +// EAGLView.h +// chuchu_iphone +// +// Created by Yury Melnichek on 08.03.09. +// Copyright __MyCompanyName__ 2009. All rights reserved. +// + +#import <UIKit/UIKit.h> +#import <OpenGLES/EAGL.h> +#import <OpenGLES/ES1/gl.h> +#import <OpenGLES/ES1/glext.h> +#import "MapViewController.h" +#include "../../std/shared_ptr.hpp" +#include "../../map/drawer_yg.hpp" +#include"RenderBuffer.hpp" + +namespace iphone +{ + class WindowHandle; + class RenderContext; + class RenderBuffer; +} + +namespace yg +{ + namespace gl + { + class FrameBuffer; + } +} + +// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. +// The view content is basically an EAGL surface you render your OpenGL scene into. +// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. +@interface EAGLView : UIView +{ +@private + // The pixel dimensions of the backbuffer + + shared_ptr<iphone::RenderContext> renderContext; + shared_ptr<iphone::RenderBuffer> renderBuffer; + shared_ptr<yg::gl::FrameBuffer> frameBuffer; + shared_ptr<DrawerYG> drawer; + +@public + + shared_ptr<iphone::WindowHandle> windowHandle; + shared_ptr<yg::ResourceManager> textureManager; + + MapViewController * controller; +} + +/// Called as a result of invalidate on iphone::WindowHandle +- (void)drawView; +- (void)drawViewThunk:(id)obj; +- (void)drawViewOnMainThread; +- (void)onSize:(int)width withHeight:(int)height; + +@property (nonatomic, assign) MapViewController * controller; +@property (nonatomic, assign) shared_ptr<iphone::WindowHandle> windowHandle; +@property (nonatomic, assign) shared_ptr<iphone::RenderContext> renderContext; +@property (nonatomic, assign) shared_ptr<yg::ResourceManager> resourceManager; + +@end |