#include <context.h>
Definition at line 20 of file context.h.
◆ Context()
Context::Context |
( |
EGLDisplay |
display, |
|
|
EGLContext |
context |
|
) |
| |
Definition at line 12 of file context.cc.
13 : display_(display), context_(context) {}
◆ ~Context()
Definition at line 15 of file context.cc.
15 {
16 if (display_ == EGL_NO_DISPLAY && context_ == EGL_NO_CONTEXT) {
17 return;
18 }
19
20 if (::eglDestroyContext(display_, context_) != EGL_TRUE) {
22 }
23}
◆ ClearCurrent()
bool Context::ClearCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 40 of file context.cc.
40 {
41 const auto result = ::eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE,
42 EGL_NO_CONTEXT);
45 return false;
46 }
47
48 return true;
49}
◆ GetHandle()
const EGLContext & Context::GetHandle |
( |
| ) |
const |
|
virtual |
Definition at line 51 of file context.cc.
51 {
52 return context_;
53}
◆ IsCurrent()
bool Context::IsCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 25 of file context.cc.
25 {
26 return ::eglGetCurrentContext() == context_;
27}
◆ MakeCurrent()
bool Context::MakeCurrent |
( |
| ) |
const |
|
virtual |
Definition at line 29 of file context.cc.
29 {
31 ::eglMakeCurrent(display_, EGL_NO_SURFACE, EGL_NO_SURFACE, context_);
34 return false;
35 }
36
37 return true;
38}
The documentation for this class was generated from the following files: