Caffe2 - C++ API
A deep learning, cross platform ML framework
AndroidGLContext.h
1 
2 #pragma once
3 
4 #include "../core/GLContext.h"
5 #include "../core/GLTexture.h"
6 #include <unordered_map>
7 
8 enum GL_Renderer { Adreno, Mali, Tegra /*, PowerVR */ };
9 
10 class AndroidGLContext : public GLContext {
11  private:
12  EGLContext _eglcontext;
13 
14  EGLContext create_opengl_thread_context();
15  bool opengl_thread_context_exists();
16  bool release_opengl_thread_context();
17 
18  public:
21  void set_context();
22  void reset_context();
23  void flush_context();
24  void init_gles3();
25  GL_Renderer get_platform();
26 };