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 / vertex_shader.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  3.6 KB  |  69 lines

  1. '''OpenGL extension ARB.vertex_shader
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension adds programmable vertex level processing to OpenGL. The
  6.     application can write vertex shaders in a high level language as defined
  7.     in the OpenGL Shading Language specification. The language itself is not
  8.     discussed here. A vertex shader replaces the transformation, texture
  9.     coordinate generation and lighting parts of OpenGL, and it also adds
  10.     texture access at the vertex level. Furthermore, management of vertex
  11.     shader objects and loading generic attributes are discussed. A vertex
  12.     shader object, attached to a program object, can be compiled and linked
  13.     to produce an executable that runs on the vertex processor in OpenGL.
  14.     This extension also defines how such an executable interacts with the
  15.     fixed functionality vertex processing of OpenGL 1.4.
  16.  
  17. The official definition of this extension is available here:
  18.     http://oss.sgi.com/projects/ogl-sample/registry/ARB/vertex_shader.txt
  19.  
  20. Automatically generated by the get_gl_extensions script, do not edit!
  21. '''
  22. from OpenGL import platform, constants, constant, arrays
  23. from OpenGL import extensions
  24. from OpenGL.GL import glget
  25. import ctypes
  26. EXTENSION_NAME = 'GL_ARB_vertex_shader'
  27. GL_VERTEX_SHADER_ARB = constant.Constant( 'GL_VERTEX_SHADER_ARB', 0x8B31 )
  28. GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = constant.Constant( 'GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB', 0x8B4A )
  29. glget.addGLGetConstant( GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, (1,) )
  30. GL_MAX_VARYING_FLOATS_ARB = constant.Constant( 'GL_MAX_VARYING_FLOATS_ARB', 0x8B4B )
  31. glget.addGLGetConstant( GL_MAX_VARYING_FLOATS_ARB, (1,) )
  32. GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = constant.Constant( 'GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB', 0x8B4C )
  33. glget.addGLGetConstant( GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, (1,) )
  34. GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = constant.Constant( 'GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB', 0x8B4D )
  35. glget.addGLGetConstant( GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, (1,) )
  36. GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = constant.Constant( 'GL_OBJECT_ACTIVE_ATTRIBUTES_ARB', 0x8B89 )
  37. GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = constant.Constant( 'GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB', 0x8B8A )
  38. glBindAttribLocationARB = platform.createExtensionFunction( 
  39.     'glBindAttribLocationARB', dll=platform.GL,
  40.     extension=EXTENSION_NAME,
  41.     resultType=None, 
  42.     argTypes=(constants.GLhandleARB, constants.GLuint, arrays.GLcharARBArray,),
  43.     doc = 'glBindAttribLocationARB( GLhandleARB(programObj), GLuint(index), GLcharARBArray(name) ) -> None',
  44.     argNames = ('programObj', 'index', 'name',),
  45. )
  46.  
  47. glGetActiveAttribARB = platform.createExtensionFunction( 
  48.     'glGetActiveAttribARB', dll=platform.GL,
  49.     extension=EXTENSION_NAME,
  50.     resultType=None, 
  51.     argTypes=(constants.GLhandleARB, constants.GLuint, constants.GLsizei, arrays.GLsizeiArray, arrays.GLintArray, arrays.GLuintArray, arrays.GLcharARBArray,),
  52.     doc = 'glGetActiveAttribARB( GLhandleARB(programObj), GLuint(index), GLsizei(maxLength), GLsizeiArray(length), GLintArray(size), GLuintArray(type), GLcharARBArray(name) ) -> None',
  53.     argNames = ('programObj', 'index', 'maxLength', 'length', 'size', 'type', 'name',),
  54. )
  55.  
  56. glGetAttribLocationARB = platform.createExtensionFunction( 
  57.     'glGetAttribLocationARB', dll=platform.GL,
  58.     extension=EXTENSION_NAME,
  59.     resultType=constants.GLint, 
  60.     argTypes=(constants.GLhandleARB, arrays.GLcharARBArray,),
  61.     doc = 'glGetAttribLocationARB( GLhandleARB(programObj), GLcharARBArray(name) ) -> constants.GLint',
  62.     argNames = ('programObj', 'name',),
  63. )
  64.  
  65.  
  66. def glInitVertexShaderARB():
  67.     '''Return boolean indicating whether this extension is available'''
  68.     return extensions.hasGLExtension( EXTENSION_NAME )
  69.