Welcome to mirror list, hosted at ThFree Co, Russian Federation.

EAGLView.h « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 04c7e16a6fff0cfd38f5d9061b38b36437169129 (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
#import <UIKit/UIKit.h>


#include "std/shared_ptr.hpp"
#include "indexer/map_style.hpp"

#ifndef USE_DRAPE

class VideoTimer;
class RenderPolicy;

namespace iphone
{
	class RenderContext;
	class RenderBuffer;
}

namespace graphics
{
	namespace gl
	{
		class FrameBuffer;
	}
}

#else

#include "drape/pointers.hpp"
namespace dp
{
  class OGLContextFactory;
}

#endif

// 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
{
#ifndef USE_DRAPE
  VideoTimer * videoTimer;
  shared_ptr<iphone::RenderContext> renderContext;
  shared_ptr<graphics::gl::FrameBuffer> frameBuffer;
  shared_ptr<iphone::RenderBuffer> renderBuffer;
  RenderPolicy * renderPolicy;
#else
  dp::MasterPointer<dp::OGLContextFactory> m_factory;
#endif
  // Do not call onSize from layoutSubViews when real size wasn't changed.
  // It's possible when we add/remove subviews (bookmark balloons) and it hangs the map without this check
  CGRect lastViewSize;
}

- (void)initRenderPolicy;
- (void)setMapStyle:(MapStyle)mapStyle;
- (CGPoint)viewPoint2GlobalPoint:(CGPoint)pt;
- (CGPoint)globalPoint2ViewPoint:(CGPoint)pt;

@end