ó
    š3j§  ã                   ó`   • S r SSKJrJrJr  SSKJrJr  SSKrSSKJ	r	J
r
  SSK7  SSKJr  S rg)	a¾
  OpenGL extension EXT.external_buffer

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

Overview (from the spec)
        
        Extension EXT_buffer_storage introduced immutable storage buffers to
        OpenGL ES. This extension allows the data store for an immutable buffer to
        be sourced from an external EGLClientBuffer, allowing sharing of EGL client
        buffers across APIs, across processes, and across different processing
        cores such as the GPU, CPU, and DSP.
        
        Operations can then be performed on the external buffer using standard
        GL buffer object procedures. The data in the allocation is not copied to
        the buffer object's data store; the external allocation represents a single
        memory allocation that can be shared across multiple GL objects -- this
        aspect is similar to EGL external images.  On the other hand, the external
        buffer does not provide lifetime guarantees including orphaning and sibling
        behavior as provided by EGL external images.
        
        The EGLClientBuffer must be allocated in a way which permits this shared
        access. For example, on Android via a shareable Android hardware buffer.
        This extension does not enable support for arbitrary EGLClientBuffers to be
        used as an external buffer.
        
        It is the application's responsibility to ensure synchronization between
        operations performed by separate components (DSP / CPU / GPU) and processes
        on the external buffer. Additionally the application is responsible for
        avoiding violating existing GL spec requirements. For example, mapping a
        single shared allocation to two GL buffer objects and then performing
        CopyBufferSubData such that the read and write regions overlap would
        violate the existing CopyBufferSubData spec regarding copies performed
        with the same buffer set for source and destination.
        
        The application must take any steps necessary to ensure memory access to
        the external buffer behaves as required by the application. For example,
        preventing compilation differences in data padding from causing data to be
        inadvertently corrupted by using defined structure alignment methods such
        as the std140 layout qualifier.  The application is responsible for
        managing the lifetime of the external buffer, ensuring that the external
        buffer is not deleted as long as there are any GL buffer objects referring
        to it.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/external_buffer.txt
é    )ÚplatformÚconstantÚarrays)Ú
extensionsÚwrapperN)Ú_typesÚ_glgets)Ú*)Ú_EXTENSION_NAMEc                  ó:   • SSK Jn   U R                  " [        5      $ )z=Return boolean indicating whether this extension is availabler   ©r   )ÚOpenGLr   ÚhasGLExtensionr   r   s    ÚZ/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/GLES2/EXT/external_buffer.pyÚglInitExternalBufferEXTr   8   s   € å!Ø×$Ò$¤oÓ7Ð7ó    )Ú__doc__r   r   r   r   r   r   ÚctypesÚOpenGL.raw.GLES2r   r	   Ú$OpenGL.raw.GLES2.EXT.external_bufferr   r   © r   r   Ú<module>r      s'   ðñ/÷` .Ñ -ß &Û ß ,Ü 2Ý @ó8r   