a
    i‚jö  ã                   @   s`   d Z ddlmZmZmZ ddlmZmZ ddlZddlm	Z	m
Z
 ddlT ddlmZ dd	„ ZdS )
a
  OpenGL extension ARB.derivative_control

This module customises the behaviour of the 
OpenGL.raw.GL.ARB.derivative_control to provide a more 
Python-friendly API

Overview (from the spec)
	
	This extension provides control over the spacial granularity at which the
	underlying implementation computes derivatives.  
	
	For example, for the coarse-granularity derivative, a single x derivative
	could be computed for each 2x2 group of pixels, using that same derivative
	value for all 4 pixels.  For the fine-granularity derivative, two
	derivatives could be computed for each 2x2 group of pixels; one for the top
	row and one for the bottom row.  Implementations vary somewhat on how this
	is done.
	
	To select the coarse derivative, use:
	
	    dFdxCoarse(p)
	    dFdyCoarse(p)
	    fwidthCoarse(p)
	
	To select the fine derivative, use:
	
	    dFdxFine(p)
	    dFdyFine(p)
	    fwidthFine(p)
	
	To select which ever is "better" (based on performance, API hints, or other
	factors), use:
	
	    dFdx(p)
	    dFdy(p)
	    fwidth(p)
	
	This last set is the set of previously existing built-ins for derivatives,
	and continues to work in a backward compatible way.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/derivative_control.txt
é    )ÚplatformÚconstantÚarrays)Ú
extensionsÚwrapperN)Ú_typesÚ_glgets)Ú*)Ú_EXTENSION_NAMEc                  C   s   ddl m}  |  t¡S )z=Return boolean indicating whether this extension is availabler   ©r   )ÚOpenGLr   ZhasGLExtensionr
   r   © r   ú^/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/OpenGL/GL/ARB/derivative_control.pyÚglInitDerivativeControlARB3   s    r   )Ú__doc__r   r   r   r   r   r   ÚctypesZOpenGL.raw.GLr   r   Z$OpenGL.raw.GL.ARB.derivative_controlr
   r   r   r   r   r   Ú<module>   s   +