MCPcopy Create free account
hub / github.com/OneLoneCoder/olcPixelGameEngine / DestroyDevice

Function DestroyDevice

olcPixelGameEngine.h:6122–6147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6120 }
6121
6122 olc::rcode DestroyDevice() override
6123 {
6124#if defined(OLC_PLATFORM_WINAPI)
6125 wglDeleteContext(glRenderContext);
6126#endif
6127
6128#if defined(OLC_PLATFORM_X11)
6129 glXMakeCurrent(olc_Display, None, NULL);
6130 glXDestroyContext(olc_Display, glDeviceContext);
6131#endif
6132
6133#if defined(OLC_PLATFORM_GLUT)
6134 glutDestroyWindow(glutGetWindow());
6135#endif
6136
6137#if defined(OLC_PLATFORM_EMSCRIPTEN)
6138 eglMakeCurrent(olc_Display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
6139 eglDestroyContext(olc_Display, olc_Context);
6140 eglDestroySurface(olc_Display, olc_Surface);
6141 eglTerminate(olc_Display);
6142 olc_Display = EGL_NO_DISPLAY;
6143 olc_Surface = EGL_NO_SURFACE;
6144 olc_Context = EGL_NO_CONTEXT;
6145#endif
6146 return olc::rcode::OK;
6147 }
6148
6149 void DisplayFrame() override
6150 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected