home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / lib / site-packages / OpenGL / GL / ARB / vertex_program.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.8 KB  |  53 lines

  1. '''OpenGL extension ARB.vertex_program
  2.  
  3. This module customises the behaviour of the 
  4. OpenGL.raw.GL.ARB.vertex_program to provide a more 
  5. Python-friendly API
  6. '''
  7. from OpenGL import platform, constants, constant, arrays
  8. from OpenGL import extensions, wrapper
  9. from OpenGL.GL import glget
  10. import ctypes
  11. from OpenGL.raw.GL.ARB.vertex_program import *
  12. ### END AUTOGENERATED SECTION
  13. # Note: sizes here are == the only documented sizes I could find,
  14. # may need a lookup table some day...
  15. glGetProgramivARB = wrapper.wrapper(glGetProgramivARB).setOutput(
  16.     'params', (1,),
  17. )
  18. glGetProgramEnvParameterdvARB = wrapper.wrapper(glGetProgramEnvParameterdvARB).setOutput(
  19.     'params',(4,),
  20. )
  21. glGetProgramEnvParameterfvARB = wrapper.wrapper(glGetProgramEnvParameterfvARB).setOutput(
  22.     'params',(4,),
  23. )
  24. glGetProgramLocalParameterdvARB = wrapper.wrapper(glGetProgramLocalParameterdvARB).setOutput(
  25.     'params',(4,),
  26. )
  27. glGetProgramLocalParameterfvARB = wrapper.wrapper(glGetProgramLocalParameterfvARB).setOutput(
  28.     'params',(4,),
  29. )
  30. glGetVertexAttribdvARB = wrapper.wrapper(glGetVertexAttribdvARB).setOutput(
  31.     'params',(1,),
  32. )
  33.  
  34. ##glGetVertexAttribPointervARB = wrapper.wrapper(glGetVertexAttribPointervARB).setOutput(
  35. ##    'pointer',(1,),
  36. ##)
  37. ##
  38. ##_base_glGetVertexAttribPointervARB
  39. ##def glGetVertexAttribPointervARB( index, pname=GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB ):
  40. ##    """Retrieve named attribute vector
  41. ##    
  42. ##    XXX Needs logic checking, I don't think I got the number of
  43. ##    levels of indirection correct... i.e. I believe it's just going
  44. ##    to rewrite the temporary void_p's value, rather than writing
  45. ##    into the numpy array.
  46. ##    
  47. ##    returns 4-element double array...
  48. ##    """
  49. ##    output = arrays.GLdoubleArray.zeros( (4,) )
  50. ##    pointer = arrays.GLdoubleArray.voidDataPointer( output )
  51. ##    _base_glGetVertexAttribPointervARB( index, pname, pointer )
  52. ##    return output
  53.