mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 13:11:57 -04:00
Add a debug flag.
This commit is contained in:
parent
5b06786960
commit
f7cd7671ae
|
@ -11,6 +11,7 @@ def main():
|
||||||
parser = argparse.ArgumentParser(prog='punyverse', description='''
|
parser = argparse.ArgumentParser(prog='punyverse', description='''
|
||||||
Python simulator of a puny universe.
|
Python simulator of a puny universe.
|
||||||
''')
|
''')
|
||||||
|
parser.add_argument('-D', '--debug', help='Enable pyglet OpenGL debugging', action='store_true')
|
||||||
parser.add_argument('-d', '--high-depth', help='Use a larger depth buffer',
|
parser.add_argument('-d', '--high-depth', help='Use a larger depth buffer',
|
||||||
const=32, default=24, dest='depth', nargs='?', type=int)
|
const=32, default=24, dest='depth', nargs='?', type=int)
|
||||||
parser.add_argument('-m', '--multisample', help='Use multisampled image, optional samples',
|
parser.add_argument('-m', '--multisample', help='Use multisampled image, optional samples',
|
||||||
|
@ -21,7 +22,7 @@ def main():
|
||||||
action='store_true')
|
action='store_true')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
pyglet.options['debug_gl'] = DEBUG
|
pyglet.options['debug_gl'] = args.debug
|
||||||
|
|
||||||
template = pyglet.gl.Config(depth_size=args.depth, double_buffer=True,
|
template = pyglet.gl.Config(depth_size=args.depth, double_buffer=True,
|
||||||
sample_buffers=args.multisample > 1,
|
sample_buffers=args.multisample > 1,
|
||||||
|
|
Loading…
Reference in a new issue