Caffe2 - C++ API
A deep learning, cross platform ML framework
GLContext.cc
1 
18 #include "IOSGLContext.h"
19 
20 std::unique_ptr<GLContext> GLContext::_glcontext = nullptr;
21 
22 void GLContext::initGLContext() {
23  if (_glcontext == nullptr) {
24  _glcontext.reset(new IOSGLContext());
25  }
26 }
27 
28 GLContext* GLContext::getGLContext() {
29  if (_glcontext == nullptr) {
30  initGLContext();
31  }
32  return _glcontext.get();
33 }
34 
35 void GLContext::deleteGLContext() { _glcontext.reset(nullptr); }
Copyright (c) 2016-present, Facebook, Inc.
Definition: GLContext.h:23
Copyright (c) 2016-present, Facebook, Inc.
Definition: IOSGLContext.h:25