Пример #1
0
void GLcleanup()
{
    CleanupTextureStore();                                // bye textures

#ifdef _WINDOWS
    wglMakeCurrent(NULL, NULL);                           // bye context
    if(GLCONTEXT) wglDeleteContext(GLCONTEXT);
    if(!bWindowMode && dcGlobal)
        ReleaseDC(hWWindow,dcGlobal);
#endif

    eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
    eglDestroySurface( display, surface );
    eglDestroyContext( display, context );
    eglTerminate( display );

#if defined(USE_X11)
    if (pandora_driver_mode == MODE_X11)
    {
        if (x11Window) XDestroyWindow(x11Display, x11Window);
        if (x11Colormap) XFreeColormap( x11Display, x11Colormap );
        if (x11Display) XCloseDisplay(x11Display);
    }
#endif
}
Пример #2
0
void GLcleanup() 
{                                                     
 KillDisplayLists();                                   // bye display lists

 if(iUseScanLines)                                     // scanlines used?
  {
   if(iScanBlend<0)
    {
     if(gTexScanName!=0)                               // some scanline tex?
      glDeleteTextures(1, &gTexScanName);              // -> delete it
     gTexScanName=0;
    }
   else glDeleteLists(uiScanLine,1);                   // otherwise del scanline display list
  }

 CleanupTextureStore();                                // bye textures
}
Пример #3
0
void GLcleanup() 
{                                                     
 CleanupTextureStore();                                // bye textures

 if(created_gles_context) {
  eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
  eglDestroySurface( display, surface );
  eglDestroyContext( display, context );
  eglTerminate( display );

#if defined(USE_X11)
		if (x11Window) XDestroyWindow(x11Display, x11Window);
		if (x11Colormap) XFreeColormap( x11Display, x11Colormap );
		if (x11Display) XCloseDisplay(x11Display);
#endif
  created_gles_context=0;
 }
}
Пример #4
0
void GLcleanup() 
{                                                     
 KillDisplayLists();                                   // bye display lists

 if(iUseScanLines)                                     // scanlines used?
  {
   if(iScanBlend<0)
    {
     if(gTexScanName!=0)                               // some scanline tex?
      glDeleteTextures(1, &gTexScanName);              // -> delete it
     gTexScanName=0;
    }
   else glDeleteLists(uiScanLine,1);                   // otherwise del scanline display list
  }

 CleanupTextureStore();                                // bye textures

#ifdef _WINDOWS 
 wglMakeCurrent(NULL, NULL);                           // bye context
 if(GLCONTEXT) wglDeleteContext(GLCONTEXT);
 if(!bWindowMode && dcGlobal) 
  ReleaseDC(hWWindow,dcGlobal);
#endif
}