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
|
# Automaticly import window auto to ensure the default window creation
|
||||||
import kivy.core.window
|
import kivy.core.window
|
||||||
|
|
||||||
# Display the current OpenGL version
|
def print_gl_version():
|
||||||
version = glGetString(GL_VERSION)
|
version = glGetString(GL_VERSION)
|
||||||
Logger.info('GL: OpenGL version <%s>' % str(version))
|
Logger.info('GL: OpenGL version <%s>' % str(version))
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,9 @@ class WindowBase(EventDispatcher):
|
||||||
if Config.getboolean('kivy', 'show_fps'):
|
if Config.getboolean('kivy', 'show_fps'):
|
||||||
self.show_fps = True
|
self.show_fps = True
|
||||||
|
|
||||||
|
# before creating the window
|
||||||
|
import kivy.core.gl
|
||||||
|
|
||||||
# configure the window
|
# configure the window
|
||||||
self.create_window(params)
|
self.create_window(params)
|
||||||
|
|
||||||
|
@ -181,7 +184,8 @@ class WindowBase(EventDispatcher):
|
||||||
|
|
||||||
def create_window(self, params):
|
def create_window(self, params):
|
||||||
'''Will create the main window and configure it'''
|
'''Will create the main window and configure it'''
|
||||||
pass
|
from kivy.core.gl import print_gl_version
|
||||||
|
print_gl_version()
|
||||||
|
|
||||||
def on_flip(self):
|
def on_flip(self):
|
||||||
'''Flip between buffers (event)'''
|
'''Flip between buffers (event)'''
|
||||||
|
|
Loading…
Reference in New Issue