MCPcopy Create free account
hub / github.com/arrayfire/forge / getCurrentContextHandle

Function getCurrentContextHandle

src/backend/opengl/gl_native_handles.cpp:25–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23{
24
25ContextHandle getCurrentContextHandle()
26{
27 auto id = ContextHandle{0};
28
29#if defined(OS_WIN)
30 const auto context = wglGetCurrentContext();
31#elif defined(OS_LNX)
32 const auto context = glXGetCurrentContext();
33#else
34 const auto context = CGLGetCurrentContext();
35#endif
36 id = reinterpret_cast<ContextHandle>(context);
37
38 return id;
39}
40
41DisplayHandle getCurrentDisplayHandle()
42{

Callers 2

getGLContextHandleMethod · 0.85
getGLContextHandleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected