def swap_buffers(self): #opengles.glFlush() #opengles.glFinish() if self.use_glx: glx.glXSwapBuffers(self.d, self.window) else: openegl.eglSwapBuffers(self.display, self.surface)
def resize(self, x=0, y=0, w=0, h=0, layer=0): # Destroy current surface and native window if self.use_glx: glx.glXSwapBuffers(self.d, self.window) else: openegl.eglSwapBuffers(self.display, self.surface) if PLATFORM == PLATFORM_PI: openegl.eglDestroySurface(self.display, self.surface) self.dispman_update = bcm.vc_dispmanx_update_start(0) bcm.vc_dispmanx_element_remove(self.dispman_update, self.dispman_element) bcm.vc_dispmanx_update_submit_sync(self.dispman_update) bcm.vc_dispmanx_display_close(self.dispman_display) #Now recreate the native window and surface self.create_surface(x, y, w, h, layer) elif PLATFORM == PLATFORM_ANDROID: pass #TODO something here elif X_WINDOW: xlib.XMoveResizeWindow(self.d, self.window, x, y, w, h)