mirror of
https://github.com/quantum5/punyverse.git
synced 2025-04-24 21:21:59 -04:00
Outright require OpenGL 3.3.
pyglet seems to detect MESA as 3.0 even though it supports 3.3, even when I create a 3.3 context.
This commit is contained in:
parent
52c1a328aa
commit
85d4bd4efc
|
@ -102,9 +102,7 @@ class Belt(Entity):
|
|||
rotation = info.get('period', 31536000)
|
||||
models = info['model']
|
||||
self.rotation_angle = 360.0 / rotation if rotation else 0
|
||||
self.render = gl_info.have_version(3, 3)
|
||||
|
||||
if self.render:
|
||||
shader = world.activate_shader('belt')
|
||||
if not isinstance(models, list):
|
||||
models = [models]
|
||||
|
@ -135,9 +133,6 @@ class Belt(Entity):
|
|||
self.rotation = pitch, self.world.tick * self.rotation_angle % 360, roll
|
||||
|
||||
def draw(self, options):
|
||||
if not self.render:
|
||||
return
|
||||
|
||||
shader = self.world.activate_shader('belt')
|
||||
shader.uniform_mat4('u_mvpMatrix', self.mvp_matrix)
|
||||
shader.uniform_mat4('u_mvMatrix', self.mv_matrix)
|
||||
|
|
|
@ -78,6 +78,8 @@ def get_context_info(context):
|
|||
zip_longest(info[::2], info[1::2], fillvalue='')]
|
||||
|
||||
with glContext(context):
|
||||
gl_info.remove_active_context()
|
||||
gl_info.set_active_context()
|
||||
return '\n'.join([
|
||||
'Graphics Vendor: ' + gl_info.get_vendor(),
|
||||
'Graphics Version: ' + gl_info.get_version(),
|
||||
|
|
|
@ -27,7 +27,7 @@ def main():
|
|||
template = pyglet.gl.Config(depth_size=args.depth, double_buffer=True,
|
||||
sample_buffers=args.multisample > 1,
|
||||
samples=args.multisample,
|
||||
major_version=3, minor_version=2)
|
||||
major_version=3, minor_version=3)
|
||||
|
||||
platform = pyglet.window.get_platform()
|
||||
display = platform.get_default_display()
|
||||
|
|
Loading…
Reference in a new issue