From 2d2cf84e8a9a1a3e272e522df3febfad561b8e11 Mon Sep 17 00:00:00 2001 From: Matthew Einhorn Date: Sat, 12 Jul 2014 19:00:04 -0400 Subject: [PATCH] Import glReadPixels from the correct place. Fixes #2032. --- kivy/core/window/window_pygame.py | 3 ++- kivy/core/window/window_sdl.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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))