File: glsl_version.py

package info (click to toggle)
pyopengl 3.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 11,184 kB
  • ctags: 21,473
  • sloc: python: 80,468; makefile: 4
file content (13 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
#! /usr/bin/env python
import pygamegltest
from OpenGL.GL import glGetString, GL_SHADING_LANGUAGE_VERSION

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

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