1'''OpenGL extension NV.point_sprite 2 3This module customises the behaviour of the 4OpenGL.raw.GL.NV.point_sprite to provide a more 5Python-friendly API 6 7Overview (from the spec) 8 9 Applications such as particle systems usually must use OpenGL quads 10 rather than points to render their geometry, since they would like to 11 use a custom-drawn texture for each particle, rather than the 12 traditional OpenGL round antialiased points, and each fragment in 13 a point has the same texture coordinates as every other fragment. 14 15 Unfortunately, specifying the geometry for these quads can be quite 16 expensive, since it quadruples the amount of geometry required, and 17 it may also require the application to do extra processing to compute 18 the location of each vertex. 19 20 The goal of this extension is to allow such apps to use points rather 21 than quads. When GL_POINT_SPRITE_NV is enabled, the state of point 22 antialiasing is ignored. For each texture unit, the app can then 23 specify whether to replace the existing texture coordinates with 24 point sprite texture coordinates, which are interpolated across the 25 point. Finally, the app can set a global parameter for the way to 26 generate the R coordinate for point sprites; the R coordinate can 27 either be zero, the input S coordinate, or the input R coordinate. 28 This allows applications to use a 3D texture to represent a point 29 sprite that goes through an animation, with filtering between frames, 30 for example. 31 32The official definition of this extension is available here: 33http://www.opengl.org/registry/specs/NV/point_sprite.txt 34''' 35from OpenGL import platform, constant, arrays 36from OpenGL import extensions, wrapper 37import ctypes 38from OpenGL.raw.GL import _types, _glgets 39from OpenGL.raw.GL.NV.point_sprite import * 40from OpenGL.raw.GL.NV.point_sprite import _EXTENSION_NAME 41 42def glInitPointSpriteNV(): 43 '''Return boolean indicating whether this extension is available''' 44 from OpenGL import extensions 45 return extensions.hasGLExtension( _EXTENSION_NAME ) 46 47# INPUT glPointParameterivNV.params size not checked against 'pname' 48glPointParameterivNV=wrapper.wrapper(glPointParameterivNV).setInputArraySize( 49 'params', None 50) 51### END AUTOGENERATED SECTION