2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// GLContext.h
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2019/01/31.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef GLCONTEXT_H
|
|
|
|
#define GLCONTEXT_H
|
|
|
|
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "backend/opengl/GLHead.hpp"
|
2019-07-25 13:36:35 +08:00
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_set>
|
2019-04-17 10:49:11 +08:00
|
|
|
namespace MNN {
|
2019-05-24 11:26:54 +08:00
|
|
|
namespace OpenGL {
|
2019-04-17 10:49:11 +08:00
|
|
|
class GLContext {
|
|
|
|
public:
|
2019-07-25 13:36:35 +08:00
|
|
|
GLContext();
|
|
|
|
~GLContext();
|
|
|
|
bool isCreateError() const;
|
|
|
|
private:
|
|
|
|
EGLContext mContext;
|
|
|
|
EGLDisplay mDisplay;
|
|
|
|
EGLSurface mSurface;
|
2019-12-27 22:16:57 +08:00
|
|
|
bool mIsCreateError{false};
|
2019-04-17 10:49:11 +08:00
|
|
|
};
|
2019-05-24 11:26:54 +08:00
|
|
|
} // namespace OpenGL
|
2019-04-17 10:49:11 +08:00
|
|
|
} // namespace MNN
|
|
|
|
|
|
|
|
#endif
|