File: byte_coordinates.py

package info (click to toggle)
pyopengl 3.1.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,668 kB
  • sloc: python: 108,024; makefile: 4
file content (63 lines) | stat: -rw-r--r-- 2,062 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'''OpenGL extension OES.byte_coordinates

This module customises the behaviour of the 
OpenGL.raw.GLES1.OES.byte_coordinates to provide a more 
Python-friendly API

Overview (from the spec)
	
	This extension allows specifying, additionally to all existing 
	values, byte-valued vertex and texture coordinates to be used.
	
	The main reason for introducing the byte-argument is to allow 
	storing data more compactly on memory-restricted environments.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/byte_coordinates.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES1 import _types, _glgets
from OpenGL.raw.GLES1.OES.byte_coordinates import *
from OpenGL.raw.GLES1.OES.byte_coordinates import _EXTENSION_NAME

def glInitByteCoordinatesOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glMultiTexCoord1bvOES=wrapper.wrapper(glMultiTexCoord1bvOES).setInputArraySize(
    'coords', 1
)
glMultiTexCoord2bvOES=wrapper.wrapper(glMultiTexCoord2bvOES).setInputArraySize(
    'coords', 2
)
glMultiTexCoord3bvOES=wrapper.wrapper(glMultiTexCoord3bvOES).setInputArraySize(
    'coords', 3
)
glMultiTexCoord4bvOES=wrapper.wrapper(glMultiTexCoord4bvOES).setInputArraySize(
    'coords', 4
)
glTexCoord1bvOES=wrapper.wrapper(glTexCoord1bvOES).setInputArraySize(
    'coords', 1
)
glTexCoord2bvOES=wrapper.wrapper(glTexCoord2bvOES).setInputArraySize(
    'coords', 2
)
glTexCoord3bvOES=wrapper.wrapper(glTexCoord3bvOES).setInputArraySize(
    'coords', 3
)
glTexCoord4bvOES=wrapper.wrapper(glTexCoord4bvOES).setInputArraySize(
    'coords', 4
)
glVertex2bvOES=wrapper.wrapper(glVertex2bvOES).setInputArraySize(
    'coords', 2
)
glVertex3bvOES=wrapper.wrapper(glVertex3bvOES).setInputArraySize(
    'coords', 3
)
glVertex4bvOES=wrapper.wrapper(glVertex4bvOES).setInputArraySize(
    'coords', 4
)
### END AUTOGENERATED SECTION