1'''OpenGL extension ATI.draw_buffers 2 3This module customises the behaviour of the 4OpenGL.raw.GL.ATI.draw_buffers to provide a more 5Python-friendly API 6 7Overview (from the spec) 8 9 This extension extends ARB_fragment_program to allow multiple output 10 colors, and provides a mechanism for directing those outputs to 11 multiple color buffers. 12 13 14The official definition of this extension is available here: 15http://www.opengl.org/registry/specs/ATI/draw_buffers.txt 16''' 17from OpenGL import platform, constant, arrays 18from OpenGL import extensions, wrapper 19import ctypes 20from OpenGL.raw.GL import _types, _glgets 21from OpenGL.raw.GL.ATI.draw_buffers import * 22from OpenGL.raw.GL.ATI.draw_buffers import _EXTENSION_NAME 23 24def glInitDrawBuffersATI(): 25 '''Return boolean indicating whether this extension is available''' 26 from OpenGL import extensions 27 return extensions.hasGLExtension( _EXTENSION_NAME ) 28 29# INPUT glDrawBuffersATI.bufs size not checked against n 30glDrawBuffersATI=wrapper.wrapper(glDrawBuffersATI).setInputArraySize( 31 'bufs', None 32) 33### END AUTOGENERATED SECTION 34from OpenGL.lazywrapper import lazy as _lazy 35@_lazy( glDrawBuffersATI ) 36def glDrawBuffersATI( baseOperation, n=None, bufs=None ): 37 """glDrawBuffersATI( bufs ) -> bufs 38 39 Wrapper will calculate n from dims of bufs if only 40 one argument is provided... 41 """ 42 if bufs is None: 43 bufs = n 44 n = None 45 bufs = arrays.GLenumArray.asArray( bufs ) 46 if n is None: 47 n = arrays.GLenumArray.arraySize( bufs ) 48 return baseOperation( n,bufs ) 49