File: check_querier_version_parse.py

package info (click to toggle)
pyopengl 3.1.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,024 kB
  • sloc: python: 108,056; sh: 13; makefile: 8
file content (14 lines) | stat: -rwxr-xr-x 437 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/env python3
import glfw
import OpenGL.GL as gl

glfw.init()
glfw.window_hint(glfw.CLIENT_API, glfw.OPENGL_ES_API)
glfw.window_hint(glfw.CONTEXT_VERSION_MAJOR, 3)
glfw.window_hint(glfw.CONTEXT_VERSION_MINOR, 1)
window = glfw.create_window(640, 480, 'Binder', None, None)
assert window
glfw.make_context_current(window)

# gl.glDispatchCompute(1,1,1) will trigger this for instance
print(gl.extensions.GLQuerier.pullVersion())