a
    ij                     @   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eejd
e
jdddZeejddddjddd dddZeejddddjddd dddZeeddZeejddddZeejd
dddZdS )a  OpenGL extension ARB.shader_subroutine

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

Overview (from the spec)
	
	This extension adds support to shaders for "indirect subroutine calls", 
	where a single shader can include many subroutines and dynamically select
	through the API which subroutine is called from each call site. 
	Switching subroutines dynamically in this fashion can avoid the cost of 
	recompiling and managing multiple shaders, while still retaining most of
	the performance of specialized shaders.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/shader_subroutine.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/shader_subroutine.pyglInitShaderSubroutineARB   s    r   valuesZpnameT)sizeZpnameArgorPassInlength)   )r   r   namec                 C   s   | fS Nr   xr   r   r   <lambda>%       r   ZbufSizec                 C   s   | fS r   r   r   r   r   r   r   *   r   indicesparams)__doc__r   r   r   r   r   r   ctypesZOpenGL.raw.GLr   r   Z#OpenGL.raw.GL.ARB.shader_subroutiner
   r   ZglGetActiveSubroutineUniformivZ	setOutputZ_glget_size_mappingZ glGetActiveSubroutineUniformNameZglGetActiveSubroutineNameZglUniformSubroutinesuivZsetInputArraySizeZglGetUniformSubroutineuivZglGetProgramStageivr   r   r   r   <module>   s:   






