File: check_egl_es1.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 (19 lines) | stat: -rwxr-xr-x 511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /usr/bin/env python
import xlibegltest as egltest
import numpy
from OpenGL import GLES1 as GL


@egltest.egltest(api='gles1')
def test_es1():
    GL.glClearColor(1, 0, 0, 0)
    GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)
    vertices = numpy.array(((1, 0, 0), (-1, 0, 0), (0, 1, 0)), 'f')
    GL.glEnableClientState(GL.GL_VERTEX_ARRAY)
    GL.glVertexPointer(3, GL.GL_FLOAT, 0, vertices)
    GL.glDrawArrays(GL.GL_TRIANGLES, 0, 3)
    print('OK')


if __name__ == "__main__":
    test_es1()