diff --git a/kivy/core/window/window_pygame.py b/kivy/core/window/window_pygame.py index ca37ea5d2..ca316c3bf 100644 --- a/kivy/core/window/window_pygame.py +++ b/kivy/core/window/window_pygame.py @@ -243,7 +243,8 @@ class WindowPygame(WindowBase): if filename is None: return None if glReadPixels is None: - from kivy.core.gl import glReadPixels, GL_RGBA, GL_UNSIGNED_BYTE + from kivy.graphics.opengl import (glReadPixels, GL_RGBA, + GL_UNSIGNED_BYTE) width, height = self.system_size data = glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE) data = str(buffer(data)) diff --git a/kivy/core/window/window_sdl.py b/kivy/core/window/window_sdl.py index ba311a182..db7a8c311 100644 --- a/kivy/core/window/window_sdl.py +++ b/kivy/core/window/window_sdl.py @@ -99,7 +99,7 @@ class WindowSDL(WindowBase): filename = super(WindowPygame, self).screenshot(*largs, **kwargs) if filename is None: return None - from kivy.core.gl import glReadPixels, GL_RGB, GL_UNSIGNED_BYTE + from kivy.graphics.opengl import glReadPixels, GL_RGB, GL_UNSIGNED_BYTE width, height = self.size data = glReadPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE) data = str(buffer(data))