forked from glumpy/glumpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defaults.py
236 lines (164 loc) · 5.54 KB
/
defaults.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
# -----------------------------------------------------------------------------
# Copyright (c) 2009-2016 Nicolas P. Rougier. All rights reserved.
# Distributed under the (new) BSD License.
# -----------------------------------------------------------------------------
"""
All default parameters and objects.
"""
# ------------------------------------------------------------------ Parser ---
def get_default_parser():
""" Default command line argument parser """
from glumpy.app.parser import get_default
return get_default()
def parser():
""" Default command line argument parser """
return get_default_parser()
# ------------------------------------------------------------------- Clock ---
def get_default_clock():
""" Default clock """
from glumpy.app.clock import get_default
return get_default()
def clock():
""" Default clock """
return get_default_clock()
# ----------------------------------------------------------- Configuration ---
def get_default_configuration():
""" Default configuration """
from glumpy.app.configuration import get_default
return get_default()
def configuration():
""" Default command line argument parser """
return get_default_configuration()
# ------------------------------------------------------------ Window width ---
__width__ = 512
def get_default_width():
""" Default window width """
return __width__
def width():
""" Default window width """
return get_default_width()
# ----------------------------------------------------------- Window height ---
__height__ = 512
def get_default_height():
""" Default window height """
return __height__
def height():
""" Default window height """
return get_default_height()
# ------------------------------------------------------- Window x position ---
__x__ = 0
def get_default_x():
""" Default window x position """
return __x__
def x():
""" Default window width """
return get_default_x()
# ------------------------------------------------------- Window y position ---
__y__ = 0
def get_default_y():
""" Default window y position """
return __y__
def y():
""" Default window width """
return get_default_y()
# --------------------------------------------------------------- Framerate ---
__framerate__ = 60.0
def get_default_framerate():
""" Default framerate """
return __framerate__
def framerate():
""" Default framerate """
return get_default_framerate()
# ------------------------------------------------------------------- vsync ---
__vsync__ = False
def get_default_vsync():
""" Default vsync """
return __vsync__
def vsync():
""" Default vsync """
return get_default_vsync()
# -------------------------------------------------------------------- srgb ---
__srgb__ = False
def get_default_srgb():
""" Default srgb """
return __srgb__
def srgb():
""" Default srgb """
return get_default_srgb()
# ------------------------------------------------------------------ stereo ---
__stereo__ = False
def get_default_stereo():
""" Default stereo """
return __stereo__
def stereo():
""" Default stereo """
return get_default_stereo()
# ----------------------------------------------------------- double buffer ---
__double_buffer__ = True
def get_default_double_buffer():
""" Default double buffer mode """
return __double_buffer__
def double_buffer():
""" Default double buffer """
return get_default_double_buffer()
# -------------------------------------------------------------- depth_size ---
__depth_size__ = 24
def get_default_depth_size():
""" Default depth size """
return __depth_size__
def depth_size():
""" Default depth size """
return get_default_depth_size()
# ------------------------------------------------------------ stencil size ---
__stencil_size__ = 0
def get_default_stencil_size():
""" Default stencil size """
return __stencil_size__
def stencil_size():
""" Default stencil size """
return get_default_stencil_size()
# -------------------------------------------------------------- GL Version ---
__gl_major_version__ = 2
__gl_minor_version__ = 1
def get_default_gl_version():
""" Default GL version """
return "%d.%d" % (__gl_major_version__,__gl_minor_version__)
def gl_version():
""" Default GL version """
return get_default_gl_version()
def get_default_gl_major_version():
""" Default GL major version """
return __gl_major_version__
def gl_major_version():
""" Default GL major version """
return get_default_gl_major_version()
def get_default_gl_minor_version():
""" Default GL minor version """
return __gl_minor_version__
def gl_minor_version():
""" Default GL minor version """
return get_default_gl_minor_version()
# ------------------------------------------------------------------ GL API ---
__gl_api__ = "GL"
def get_default_gl_api():
""" Default GL API """
return __gl_api__
def gl_api():
""" Default GL API """
return get_default_gl_api()
# -------------------------------------------------------------- GL profile ---
__gl_profile__ = "none"
def get_default_gl_profile():
""" Default GL profile """
return __gl_profile__
def gl_profile():
""" Default GL profile """
return get_default_gl_profile()
# ----------------------------------------------------------------- Backend ---
__backend__ = "glfw"
def get_default_backend():
""" Default backend """
return __backend__
def backend():
""" Default backend """
return get_default_backend()