a
    ijy                     @   s   d Z ddlZG dd dZdS )#An OpenGL context created via GLFW.    Nc                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )	GLContextr   c                 C   s0   t   t t jd t j||dd d d| _d S )Nr   zInvisible window)widthheighttitleZmonitorZshare)glfwinitZwindow_hintZVISIBLEZcreate_window_context)self	max_width
max_height r   T/home/ghrups/robot-bench/.venv/lib64/python3.9/site-packages/mujoco/glfw/__init__.py__init__   s    zGLContext.__init__c                 C   s   t | j d S N)r   make_context_currentr	   r
   r   r   r   make_current   s    zGLContext.make_currentc                 C   s4   | j r*t | j krtd  t| j  d | _ d S r   )r	   r   Zget_current_contextr   Zdestroy_windowr   r   r   r   free!   s
    
zGLContext.freec                 C   s   |    d S r   )r   r   r   r   r   __del__(   s    zGLContext.__del__N)__name__
__module____qualname____doc__r   r   r   r   r   r   r   r   r      s
   r   )r   r   r   r   r   r   r   <module>   s   