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 / point_sprite.py < prev    next >
Encoding:
Python Source  |  2008-12-07  |  1.7 KB  |  41 lines

  1. '''OpenGL extension ARB.point_sprite
  2.  
  3. Overview (from the spec)
  4.     
  5.     Applications such as particle systems have tended to use OpenGL quads
  6.     rather than points to render their geometry, since they would like
  7.     to use a custom-drawn texture for each particle, rather than the
  8.     traditional OpenGL round antialiased points, and each fragment in
  9.     a point has the same texture coordinates as every other fragment.
  10.     
  11.     Unfortunately, specifying the geometry for these quads can be
  12.     expensive, since it quadruples the amount of geometry required, and
  13.     may also require the application to do extra processing to compute
  14.     the location of each vertex.
  15.     
  16.     The purpose of this extension is to allow such applications to use
  17.     points rather than quads.  When GL_POINT_SPRITE_ARB is enabled,
  18.     the state of point antialiasing is ignored.  For each texture unit,
  19.     the app can then specify whether to replace the existing texture
  20.     coordinates with point sprite texture coordinates, which are
  21.     interpolated across the point.
  22.  
  23. The official definition of this extension is available here:
  24.     http://oss.sgi.com/projects/ogl-sample/registry/ARB/point_sprite.txt
  25.  
  26. Automatically generated by the get_gl_extensions script, do not edit!
  27. '''
  28. from OpenGL import platform, constants, constant, arrays
  29. from OpenGL import extensions
  30. from OpenGL.GL import glget
  31. import ctypes
  32. EXTENSION_NAME = 'GL_ARB_point_sprite'
  33. GL_POINT_SPRITE_ARB = constant.Constant( 'GL_POINT_SPRITE_ARB', 0x8861 )
  34. glget.addGLGetConstant( GL_POINT_SPRITE_ARB, (1,) )
  35. GL_COORD_REPLACE_ARB = constant.Constant( 'GL_COORD_REPLACE_ARB', 0x8862 )
  36.  
  37.  
  38. def glInitPointSpriteARB():
  39.     '''Return boolean indicating whether this extension is available'''
  40.     return extensions.hasGLExtension( EXTENSION_NAME )
  41.