File: vertex_program.py

package info (click to toggle)
pyopengl 3.0.0~b6-3
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 5,696 kB
  • ctags: 26,182
  • sloc: python: 34,233; ansic: 70; sh: 26; makefile: 15
file content (52 lines) | stat: -rw-r--r-- 1,836 bytes parent folder | download
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
'''OpenGL extension ARB.vertex_program

This module customises the behaviour of the 
OpenGL.raw.GL.ARB.vertex_program to provide a more 
Python-friendly API
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions, wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.ARB.vertex_program import *
### END AUTOGENERATED SECTION
# Note: sizes here are == the only documented sizes I could find,
# may need a lookup table some day...
glGetProgramivARB = wrapper.wrapper(glGetProgramivARB).setOutput(
	'params', (1,),
)
glGetProgramEnvParameterdvARB = wrapper.wrapper(glGetProgramEnvParameterdvARB).setOutput(
	'params',(4,),
)
glGetProgramEnvParameterfvARB = wrapper.wrapper(glGetProgramEnvParameterfvARB).setOutput(
	'params',(4,),
)
glGetProgramLocalParameterdvARB = wrapper.wrapper(glGetProgramLocalParameterdvARB).setOutput(
	'params',(4,),
)
glGetProgramLocalParameterfvARB = wrapper.wrapper(glGetProgramLocalParameterfvARB).setOutput(
	'params',(4,),
)
glGetVertexAttribdvARB = wrapper.wrapper(glGetVertexAttribdvARB).setOutput(
	'params',(1,),
)

##glGetVertexAttribPointervARB = wrapper.wrapper(glGetVertexAttribPointervARB).setOutput(
##	'pointer',(1,),
##)
##
##_base_glGetVertexAttribPointervARB
##def glGetVertexAttribPointervARB( index, pname=GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB ):
##	"""Retrieve named attribute vector
##	
##	XXX Needs logic checking, I don't think I got the number of
##	levels of indirection correct... i.e. I believe it's just going
##	to rewrite the temporary void_p's value, rather than writing
##	into the numpy array.
##	
##	returns 4-element double array...
##	"""
##	output = arrays.GLdoubleArray.zeros( (4,) )
##	pointer = arrays.GLdoubleArray.voidDataPointer( output )
##	_base_glGetVertexAttribPointervARB( index, pname, pointer )
##	return output