§
    ø(g'
  ã                   ó   — d Z ddœd„ZdS ))Úbatch_for_shaderN)Úindicesc          	      ój  ‡— ddl m}m}m}m} d„ }ˆfd„}	d„ }
‰                     ¦   «         D ]}t          |¦  «        } nt          d¦  «        ‚ |¦   «         }|                      ¦   «         }|D ]=\  }} ||¦  «        } |	|¦  «        }| 	                    ||| |
|¦  «        ¬¦  «         Œ> |||¦  «        }‰ 
                    ¦   «         D ]=\  }}t          |¦  «        |k    rt          d¦  «        ‚|                     ||¦  «         Œ>|€ |||¬
¦  «        S  |||¬¦  «        } ||||¬¦  «        S )a¤  
    Return a batch already configured and compatible with the shader.

    :arg shader: shader for which a compatible format will be computed.
    :type shader: :class:`gpu.types.GPUShader`
    :arg type: "'POINTS', 'LINES', 'TRIS' or 'LINES_ADJ'".
    :type type: str
    :arg content: Maps the name of the shader attribute with the data to fill the vertex buffer.
       For the dictionary values see documentation for :class:`gpu.types.GPUVertBuf.attr_fill` data argument.
    :type content: dict[str, Buffer | Sequence[float] | Sequence[int] | Sequence[Sequence[float]] | Sequence[Sequence[int]]]
    :return: compatible batch
    :rtype: :class:`gpu.types.GPUBatch`
    é    )ÚGPUBatchÚGPUIndexBufÚ
GPUVertBufÚGPUVertFormatc                 ó   — | dv rdS | dv rdS dS )N>   ÚMAT3ÚMAT4ÚVEC2ÚVEC3ÚVEC4ÚFLOATÚF32>   ÚUINTÚUVEC2ÚUVEC3ÚUVEC4ÚU32ÚI32© )Ú	attr_types    úV/home/blender/git/blender-v430/install_release/4.3/scripts/modules/gpu_extras/batch.pyÚrecommended_comp_typez/batch_for_shader.<locals>.recommended_comp_type    s)   € ØÐIÐIÐIØ�5ØÐ;Ð;Ð;Ø�5àˆuó    c                 ó�   •— d}	 ‰|          d         }	 |t          |¦  «        z  }|d         }Œ# t          t          f$ r Y nw xY w|S )Né   r   )ÚlenÚ	TypeErrorÚ
IndexError)Ú	attr_nameÚattr_lenÚitemÚcontents      €r   Úrecommended_attr_lenz.batch_for_shader.<locals>.recommended_attr_len(   sk   ø€ Øˆð	Ø˜9Ô% aÔ(ˆDðØ�C ™IœIÑ%�Ø˜A”w�ðøõ �:Ð&ð 	ð 	ð 	ØˆDð	øøøàˆs   …*/ ¯AÁAc                 ó   — | dk    rdS dS )Nr   r   ÚINTr   )Ú	comp_types    r   Úrecommended_fetch_modez0batch_for_shader.<locals>.recommended_fetch_mode3   s   € Ø˜ÒÐØ�7Øˆur   zEmpty 'content')Úidr)   r   Ú
fetch_modez$Length mismatch for 'content' valuesN)ÚtypeÚbuf)r-   Úseq)r-   r.   Úelem)Ú	gpu.typesr   r   r   r	   Úvaluesr   Ú
ValueErrorÚattrs_info_getÚattr_addÚitemsÚ	attr_fill)Úshaderr-   r%   r   r   r   r   r	   r   r&   r*   ÚdataÚvbo_lenÚ
vbo_formatÚ
attrs_infoÚnamer   r)   r#   Úvbor+   Úibos     `                   r   r   r   
   sÖ  ø€ ðð ð ð ð ð ð ð ð ð ð ð ðð ð ð	ð 	ð 	ð 	ð 	ðð ð ð
 —’Ñ Ô ð ,ð ,ˆÝ�d‘)”)ˆØˆåÐ*Ñ+Ô+Ð+à�‘”€JØ×&Ò&Ñ(Ô(€JØ%ð vð v‰ˆˆiØ)Ð)¨)Ñ4Ô4ˆ	Ø'Ð'¨Ñ-Ô-ˆØ×Ò˜t¨y¸hÐSiÐSiÐjsÑStÔStÐÑuÔuÐuÐuà
ˆ*�Z Ñ
)Ô
)€Cà—M’M‘O”Oð  ð  ‰ˆˆDÝˆt‰9Œ9˜ÒÐÝÐCÑDÔDÐDØ�Š�b˜$ÑÔÐÐà€Øˆx˜T sÐ+Ñ+Ô+Ð+àˆk˜t¨Ð1Ñ1Ô1ˆØˆx˜T s°Ð5Ñ5Ô5Ð5r   )Ú__all__r   r   r   r   ú<module>rA      s;   ðð
€ð
 8<ð F6ð F6ð F6ð F6ð F6ð F6ð F6r   