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 / EXT / cull_vertex.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  2.1 KB  |  52 lines

  1. '''OpenGL extension EXT.cull_vertex
  2.  
  3. Overview (from the spec)
  4.     
  5.     This extension introduces a method for culling vertexes in object
  6.     space based on the value of the dot product between the normal at
  7.     the vertex and a culling eye direction.
  8.     
  9.     Culling a polygon by examining its vertexes in object space can be
  10.     more efficient than screen space polygon culling since the transformation
  11.     to screen space (which may include a division by w) can be avoided for
  12.     culled vertexes.  Also, vertex culling can be computed before vertexes
  13.     are assembled into primitives.  This is a useful property when drawing
  14.     meshes with shared vertexes, since a vertex can be culled once, and the
  15.     resulting state can be used for all primitives which share the vertex.
  16.  
  17. The official definition of this extension is available here:
  18.     http://oss.sgi.com/projects/ogl-sample/registry/EXT/cull_vertex.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_EXT_cull_vertex'
  27. GL_CULL_VERTEX_EXT = constant.Constant( 'GL_CULL_VERTEX_EXT', 0x81AA )
  28. GL_CULL_VERTEX_EYE_POSITION_EXT = constant.Constant( 'GL_CULL_VERTEX_EYE_POSITION_EXT', 0x81AB )
  29. GL_CULL_VERTEX_OBJECT_POSITION_EXT = constant.Constant( 'GL_CULL_VERTEX_OBJECT_POSITION_EXT', 0x81AC )
  30. glCullParameterdvEXT = platform.createExtensionFunction( 
  31.     'glCullParameterdvEXT', dll=platform.GL,
  32.     extension=EXTENSION_NAME,
  33.     resultType=None, 
  34.     argTypes=(constants.GLenum, arrays.GLdoubleArray,),
  35.     doc = 'glCullParameterdvEXT( GLenum(pname), GLdoubleArray(params) ) -> None',
  36.     argNames = ('pname', 'params',),
  37. )
  38.  
  39. glCullParameterfvEXT = platform.createExtensionFunction( 
  40.     'glCullParameterfvEXT', dll=platform.GL,
  41.     extension=EXTENSION_NAME,
  42.     resultType=None, 
  43.     argTypes=(constants.GLenum, arrays.GLfloatArray,),
  44.     doc = 'glCullParameterfvEXT( GLenum(pname), GLfloatArray(params) ) -> None',
  45.     argNames = ('pname', 'params',),
  46. )
  47.  
  48.  
  49. def glInitCullVertexEXT():
  50.     '''Return boolean indicating whether this extension is available'''
  51.     return extensions.hasGLExtension( EXTENSION_NAME )
  52.