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e_d
e_de_d
e_ddd„ZdS )a  OpenGL extension EXT.device_base

This module customises the behaviour of the 
OpenGL.raw.EGL.EXT.device_base to provide a more 
Python-friendly API

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/device_base.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   úX/home/ghrups/robot-bench/.venv/lib/python3.9/site-packages/OpenGL/EGL/EXT/device_base.pyÚglInitDeviceBaseEXT   s    r   Té
   c                 C   s2   t j|  ƒ }t  ¡ }t| ||ƒr.|d|j… S g S )z0Utility function that retrieves platform devicesN)r   ZEGLDeviceEXTZEGLintÚeglQueryDevicesEXTÚvalue)Ú	max_countZdevicesÚcountr   r   r   Úegl_get_devices   s
    r   )r   )Ú__doc__r   r   r   r   r   r   ÚctypesZOpenGL.raw.EGLr   r   ZOpenGL.raw.EGL.EXT.device_baser
   r   r   Ú	extensionZforce_extensionZeglQueryDeviceStringEXTr   r   r   r   r   Ú<module>   s   	