File: glsl_version.py

package info (click to toggle)
pyopengl 3.1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,732 kB
  • sloc: python: 106,016; makefile: 8
file content (16 lines) | stat: -rw-r--r-- 520 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env python
from __future__ import print_function
import pygamegltest
from OpenGL.GL import glGetString, GL_SHADING_LANGUAGE_VERSION
from OpenGL._bytes import as_8_bit

@pygamegltest.pygametest(name='Get GL_SHADING_LANGUAGE_VERSION')
def show_glsl_version():
    version = glGetString( GL_SHADING_LANGUAGE_VERSION )
    version = version.split(as_8_bit(' '))[0]
    version = [int(x) for x in version.split(as_8_bit('.'))[:2]]
    return version 

if __name__ == "__main__":
    print( show_glsl_version() )