a
    ij^                  	   @   sH  d dl mZ d dlmZmZmZmZmZ d dlT d dl	m
Z d dl mZ d dlZdd Zed	d
ZeddZeddZeddZeddZeddZeddZeddZeddZeddZeddZeddZed d!Zed"d#Zed$d%Zed&d'Zed(d)Z ed*d+Z!ed,d-Z"ed.d/Z#ed.d0Z$ed1d2Z%ed3d4Z&ej'Z(ee)e*ee*d5d6 Z+ee)e*eeeee*d7d8 Z,ee)e*ej-e*d9d: Z.ee)de*d;d< Z/ee)ee*e0deeed=d> Z1ee)deed?d@ Z2dAdB Z3dCdD Z4dEdF Z5ee)edGdH Z6ee)e*ej7edIdJ Z8g dKZ9dS )L    )arrays)GLenum	GLbooleanGLsizeiGLintGLuint)*)Constant)platformNc                 C   s   t j| t jjd d dS )N)Zerror_checker)_pZcreateFunctionPLATFORMZOSMesa)function r   T/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/OpenGL/raw/osmesa/mesa.py_f   s
    r   OSMESA_COLOR_INDEXi   OSMESA_RGBAi  OSMESA_BGRA   OSMESA_ARGB   
OSMESA_RGBi  
OSMESA_BGR      OSMESA_ROW_LENGTH   OSMESA_Y_UP   OSMESA_WIDTH    OSMESA_HEIGHT!   OSMESA_FORMAT"   OSMESA_TYPE#   OSMESA_MAX_WIDTH$   OSMESA_MAX_HEIGHT%   OSMESA_DEPTH_BITS0   OSMESA_STENCIL_BITS1   OSMESA_ACCUM_BITS2   OSMESA_PROFILE3   OSMESA_CORE_PROFILE4   5   OSMESA_CONTEXT_MAJOR_VERSION6   OSMESA_CONTEXT_MINOR_VERSION7   c                 C   s   d S Nr   )format	sharelistr   r   r   OSMesaCreateContext)   s    r=   c                 C   s   d S r:   r   )r;   Z	depthBitsZstencilBitsZ	accumBitsr<   r   r   r   OSMesaCreateContextExt-   s    r>   c                 C   s   d S r:   r   )Z
attribListr<   r   r   r   OSMesaCreateContextAttribs1   s    r?   c                 C   s   d S r:   r   )ctxr   r   r   OSMesaDestroyContext5   s    rA   c                 C   s   d S r:   r   r@   buffertypewidthheightr   r   r   OSMesaMakeCurrent9   s    rG   c                 C   s   d S r:   r   rB   r   r   r   OSMesaPixelStore=   s    rH   c                 C   s"   t  }tjj| t| |jS r:   )r   r   r   GLOSMesaGetIntegervctypesbyrefvalue)ZpnamerM   r   r   r   rJ   A   s    rJ   c              	   C   sj   t  t  t    }}}tt  }tjj| t|t|t|t|rb|j|j|j|fS dS d S N)r   r   r   N)	r   rK   POINTERr   r   rI   OSMesaGetDepthBufferrL   rM   )crE   rF   ZbytesPerValuerC   r   r   r   rP   F   s    rP   c              	   C   sf   t  t  t    }}}t }tjj| t|t|t|t|r^|j|j|j|fS dS d S rN   )	r   rK   Zc_void_pr   r   rI   OSMesaGetColorBufferrL   rM   )rQ   rE   rF   r;   rC   r   r   r   rR   R   s    rR   c                 C   s   dS )zIEnable/disable color clamping, off by default

    New in Mesa 6.4.2
    Nr   )enabler   r   r   OSMesaColorClampa   s    rT   c                 C   s   dS )a  Enable/disable Gallium post-process filters.

    This should be called after a context is created, but before it is
    made current for the first time.  After a context has been made
    current, this function has no effect.

    If the enable_value param is zero, the filter is disabled.  Otherwise
    the filter is enabled, and the value may control the filter's quality.
    New in Mesa 10.0
    Nr   )ZosmesafilterZenable_valuer   r   r   OSMesaPostprocessi   s    rV   )#r=   r>   rG   rJ   OSMesaGetCurrentContextrA   rH   rP   rR   r?   rT   rV   r   r   r   r   r   r   r   r   r   r   r!   r#   r%   r'   r)   r+   r-   r/   r1   r3   OSMESA_COMPAT_PROFILEr6   r8   ):ZOpenGLr   ZOpenGL.raw.GL._typesr   r   r   r   r   ZOpenGL.raw.osmesa._typesZOpenGL.constantr	   Z_Cr
   r   rK   r   r   r   r   r   r   r   ZOSMESA_RGB_565r   r   r   r!   r#   r%   r'   r)   r+   r-   r/   r1   r3   rX   r6   r8   ZGetCurrentContextrW   typesZOSMesaContextr=   r>   Z
GLintArrayr?   rA   rO   rG   rH   rJ   rP   rR   rT   ZGLcharArrayrV   __all__r   r   r   r   <module>   st   























