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 / VERSION / GL_1_4.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.2 KB  |  34 lines

  1. '''OpenGL extension VERSION.GL_1_4
  2.  
  3. This module customises the behaviour of the 
  4. OpenGL.raw.GL.VERSION.GL_1_4 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.VERSION.GL_1_4 import *
  12. ### END AUTOGENERATED SECTION
  13. from OpenGL.lazywrapper import lazy
  14. from OpenGL.GL.pointers import glDrawElements
  15. #glMultiDrawElements = wrapper.wrapper( glMultiDrawElements ).setPyConverter(
  16. #    'indices', arrays.AsArrayOfType( 'indices', 'type' ),
  17. #).setCResolver( 
  18. #    'indices', arrays.ArrayDatatype.voidDataPointer ,
  19. #).setPyConverter(
  20. #    'count', arrays.AsArrayTyped( 'count', arrays.GLsizeiArray ),
  21. #).setCResolver(
  22. #    'count', arrays.ArrayDatatype.voidDataPointer ,
  23. #)
  24.  
  25. @lazy( glMultiDrawElements )
  26. def glMultiDrawElements(baseOperation, primtype, counts, typ, indices, primcount):
  27.     """Currently glMultiDrawElements is not working in the wrapper 
  28.     
  29.     We are replacing the code with a sequence of glDrawElements calls
  30.     as per the spec for the function...
  31.     """
  32.     for i in xrange( primcount ):
  33.         glDrawElements( primtype, counts[i], typ, indices[i] )
  34.