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

RenderBuffer.hpp « Classes « Maps « iphone - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c431787521db6c1150e6bf91e8c2b3e43da9b39 (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
#pragma once

#include "RenderContext.hpp"
#include "std/shared_ptr.hpp"
#include "graphics/render_target.hpp"

@class CAEAGLLayer;

namespace iphone
{

class RenderBuffer : public graphics::RenderTarget
{
private:
  unsigned int m_id;
  shared_ptr<RenderContext> m_renderContext;
  int m_width;
  int m_height;

public:
  RenderBuffer(shared_ptr<RenderContext> renderContext, CAEAGLLayer * layer);
  RenderBuffer(shared_ptr<RenderContext> renderContext, int width, int height);
  ~RenderBuffer();

  void makeCurrent();

  unsigned int id() const;

  void present();

  unsigned width() const;
  unsigned height() const;

  void attachToFrameBuffer();
  void detachFromFrameBuffer();
  void coordMatrix(math::Matrix<float, 4, 4> & m);
};

}