-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
53 lines (41 loc) · 1.23 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/python3
"""OpenGL capabilities viewer."""
from kivy.app import App
from kivy.lang import Builder
from kivy.graphics.opengl import *
from kivy.uix.boxlayout import BoxLayout
#Constants
#==============================================================================
__author__ = "Eric Snyder"
__copyright__ = "Copyright (c) 2021 by Eric Snyder"
__license__ = "MIT"
__version__ = "1.0.0"
KVLANG = """
<MainScreen>:
orientation: "vertical"
ext_list: ExtList
Label:
text: "Extensions:"
size_hint_y: .1
TextInput:
id: ExtList
text: ""
readonly: True
"""
#Classes
#==============================================================================
class MainScreen(BoxLayout):
"""The main screen for this app."""
def __init__(self, **kwargs):
"""Setup this screen."""
super(MainScreen, self).__init__(**kwargs)
self.ext_list.text = glGetString(GL_EXTENSIONS).replace(b" ", b"\n")
class KvCaps(App):
"""A basic app class."""
def build(self):
"""Build the UI for this app."""
Builder.load_string(KVLANG)
return MainScreen()
#Entry Point
#==============================================================================
KvCaps().run()