Caffe2 - C++ API
A deep learning, cross platform ML framework
GLContext.cc
1 
2 #include "AndroidGLContext.h"
3 
4 std::unique_ptr<GLContext> GLContext::_glcontext = nullptr;
5 
6 void GLContext::initGLContext() {
7  if (_glcontext == nullptr) {
8  _glcontext.reset(new AndroidGLContext());
9  }
10 }
11 
12 GLContext* GLContext::getGLContext() {
13  if (_glcontext == nullptr) {
14  initGLContext();
15  }
16  return _glcontext.get();
17 }
18 
19 void GLContext::deleteGLContext() { _glcontext.reset(nullptr); }