mirror of https://github.com/kivy/kivy.git
opengl: ensure the gl provider is imported before window creation
+ export the print gl version to be called after window creation
This commit is contained in:
parent
c152f2a29b
commit
2a30b4a52a
|
@ -19,7 +19,6 @@ if gl_check.lower() in ['0', 'false', 'no']:
|
|||
# Automaticly import window auto to ensure the default window creation
|
||||
import kivy.core.window
|
||||
|
||||
# Display the current OpenGL version
|
||||
def print_gl_version():
|
||||
version = glGetString(GL_VERSION)
|
||||
Logger.info('GL: OpenGL version <%s>' % str(version))
|
||||
|
||||
|
|
|
@ -154,6 +154,9 @@ class WindowBase(EventDispatcher):
|
|||
if Config.getboolean('kivy', 'show_fps'):
|
||||
self.show_fps = True
|
||||
|
||||
# before creating the window
|
||||
import kivy.core.gl
|
||||
|
||||
# configure the window
|
||||
self.create_window(params)
|
||||
|
||||
|
@ -181,7 +184,8 @@ class WindowBase(EventDispatcher):
|
|||
|
||||
def create_window(self, params):
|
||||
'''Will create the main window and configure it'''
|
||||
pass
|
||||
from kivy.core.gl import print_gl_version
|
||||
print_gl_version()
|
||||
|
||||
def on_flip(self):
|
||||
'''Flip between buffers (event)'''
|
||||
|
|
Loading…
Reference in New Issue