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 / raw / GL / ARB / draw_buffers.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.3 KB  |  51 lines

  1. '''OpenGL extension ARB.draw_buffers
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension extends ARB_fragment_program and ARB_fragment_shader
  6.     to allow multiple output colors, and provides a mechanism for
  7.     directing those outputs to multiple color buffers.
  8.     
  9.  
  10. The official definition of this extension is available here:
  11.     http://oss.sgi.com/projects/ogl-sample/registry/ARB/draw_buffers.txt
  12.  
  13. Automatically generated by the get_gl_extensions script, do not edit!
  14. '''
  15. from OpenGL import platform, constants, constant, arrays
  16. from OpenGL import extensions
  17. from OpenGL.GL import glget
  18. import ctypes
  19. EXTENSION_NAME = 'GL_ARB_draw_buffers'
  20. GL_MAX_DRAW_BUFFERS_ARB = constant.Constant( 'GL_MAX_DRAW_BUFFERS_ARB', 0x8824 )
  21. glget.addGLGetConstant( GL_MAX_DRAW_BUFFERS_ARB, (1,) )
  22. GL_DRAW_BUFFER0_ARB = constant.Constant( 'GL_DRAW_BUFFER0_ARB', 0x8825 )
  23. GL_DRAW_BUFFER1_ARB = constant.Constant( 'GL_DRAW_BUFFER1_ARB', 0x8826 )
  24. GL_DRAW_BUFFER2_ARB = constant.Constant( 'GL_DRAW_BUFFER2_ARB', 0x8827 )
  25. GL_DRAW_BUFFER3_ARB = constant.Constant( 'GL_DRAW_BUFFER3_ARB', 0x8828 )
  26. GL_DRAW_BUFFER4_ARB = constant.Constant( 'GL_DRAW_BUFFER4_ARB', 0x8829 )
  27. GL_DRAW_BUFFER5_ARB = constant.Constant( 'GL_DRAW_BUFFER5_ARB', 0x882A )
  28. GL_DRAW_BUFFER6_ARB = constant.Constant( 'GL_DRAW_BUFFER6_ARB', 0x882B )
  29. GL_DRAW_BUFFER7_ARB = constant.Constant( 'GL_DRAW_BUFFER7_ARB', 0x882C )
  30. GL_DRAW_BUFFER8_ARB = constant.Constant( 'GL_DRAW_BUFFER8_ARB', 0x882D )
  31. GL_DRAW_BUFFER9_ARB = constant.Constant( 'GL_DRAW_BUFFER9_ARB', 0x882E )
  32. GL_DRAW_BUFFER10_ARB = constant.Constant( 'GL_DRAW_BUFFER10_ARB', 0x882F )
  33. GL_DRAW_BUFFER11_ARB = constant.Constant( 'GL_DRAW_BUFFER11_ARB', 0x8830 )
  34. GL_DRAW_BUFFER12_ARB = constant.Constant( 'GL_DRAW_BUFFER12_ARB', 0x8831 )
  35. GL_DRAW_BUFFER13_ARB = constant.Constant( 'GL_DRAW_BUFFER13_ARB', 0x8832 )
  36. GL_DRAW_BUFFER14_ARB = constant.Constant( 'GL_DRAW_BUFFER14_ARB', 0x8833 )
  37. GL_DRAW_BUFFER15_ARB = constant.Constant( 'GL_DRAW_BUFFER15_ARB', 0x8834 )
  38. glDrawBuffersARB = platform.createExtensionFunction( 
  39.     'glDrawBuffersARB', dll=platform.GL,
  40.     extension=EXTENSION_NAME,
  41.     resultType=None, 
  42.     argTypes=(constants.GLsizei, arrays.GLuintArray,),
  43.     doc = 'glDrawBuffersARB( GLsizei(n), GLuintArray(bufs) ) -> None',
  44.     argNames = ('n', 'bufs',),
  45. )
  46.  
  47.  
  48. def glInitDrawBuffersARB():
  49.     '''Return boolean indicating whether this extension is available'''
  50.     return extensions.hasGLExtension( EXTENSION_NAME )
  51.