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

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

Overview (from the spec)
	
	This extension adds support for features of OpenGL ES 2.0 that are
	missing from OpenGL 3.x. Enabling these features will ease the process
	of porting applications from OpenGL ES 2.0 to OpenGL.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/ES2_compatibility.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/ES2_compatibility.pyglInitEs2CompatibilityARB   s    r   binaryZshaders	precision)   T)sizeZorPassInrange   )lazywrapper)
GLintArrayc                 C   s:   |du rt d}|du r$t d}| |||| ||fS )zGProvides range and precision if not provided, returns (range,precision)Nr   )r   Zzeros)ZbaseOperationZ
shadertypeZprecisiontyper   r   r   r   r   glGetShaderPrecisionFormat+   s    

r   )NN)__doc__r   r   r   r   r   r   ctypesZOpenGL.raw.GLr   r   Z#OpenGL.raw.GL.ARB.ES2_compatibilityr
   r   ZglShaderBinaryZsetInputArraySizer   Z	setOutputr   Z_lazywrapperZOpenGL.arraysr   Zlazyr   r   r   r   <module>   s*   

