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

androidoglcontext.hpp « opengl « mapswithme « com « jni « android - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 424aac5ff38c1c6adcd34c261f030a8e407e80c7 (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 "drape/oglcontext.hpp"

#include <EGL/egl.h>
#include <GLES2/gl2.h>

namespace android
{

class AndroidOGLContext : public dp::OGLContext
{
public:
  AndroidOGLContext(EGLDisplay display, EGLSurface surface, EGLConfig config, AndroidOGLContext * contextToShareWith);
  ~AndroidOGLContext();

  void makeCurrent() override;
  void doneCurrent() override;
  void present() override;
  void setDefaultFramebuffer() override;
  void setRenderingEnabled(bool enabled) override;

  void setSurface(EGLSurface surface);
  void resetSurface();

  void clearCurrent();

private:
  // {@ Owned by Context
  EGLContext m_nativeContext;
  // @}

  // {@ Owned by Factory
  EGLSurface m_surface;
  EGLDisplay m_display;
  // @}
};

}  // namespace android