blob: ff9b0e7938ff60f4b6df599066dce70880fda126 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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
|