src/video/pandora/SDL_pandora.c
changeset 10690 23a825f341e6
parent 10208 49c460371a4a
child 10737 3406a0f8b041
equal deleted inserted replaced
10689:69d6c1c7a2bf 10690:23a825f341e6
   772 PND_gl_getswapinterval(_THIS)
   772 PND_gl_getswapinterval(_THIS)
   773 {
   773 {
   774     return ((SDL_VideoData *) _this->driverdata)->swapinterval;
   774     return ((SDL_VideoData *) _this->driverdata)->swapinterval;
   775 }
   775 }
   776 
   776 
   777 void
   777 int
   778 PND_gl_swapwindow(_THIS, SDL_Window * window)
   778 PND_gl_swapwindow(_THIS, SDL_Window * window)
   779 {
   779 {
   780     SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
   780     SDL_VideoData *phdata = (SDL_VideoData *) _this->driverdata;
   781     SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
   781     SDL_WindowData *wdata = (SDL_WindowData *) window->driverdata;
   782 
   782 
   783     if (phdata->egl_initialized != SDL_TRUE) {
   783     if (phdata->egl_initialized != SDL_TRUE) {
   784         SDL_SetError("PND: GLES initialization failed, no OpenGL ES support");
   784         return SDL_SetError("PND: GLES initialization failed, no OpenGL ES support");
   785         return;
       
   786     }
   785     }
   787 
   786 
   788     /* Many applications do not uses glFinish(), so we call it for them */
   787     /* Many applications do not uses glFinish(), so we call it for them */
   789     glFinish();
   788     glFinish();
   790 
   789 
   791     /* Wait until OpenGL ES rendering is completed */
   790     /* Wait until OpenGL ES rendering is completed */
   792     eglWaitGL();
   791     eglWaitGL();
   793 
   792 
   794     eglSwapBuffers(phdata->egl_display, wdata->gles_surface);
   793     eglSwapBuffers(phdata->egl_display, wdata->gles_surface);
       
   794     return 0;
   795 }
   795 }
   796 
   796 
   797 void
   797 void
   798 PND_gl_deletecontext(_THIS, SDL_GLContext context)
   798 PND_gl_deletecontext(_THIS, SDL_GLContext context)
   799 {
   799 {