
    3j:!                        S r SSKJr  SSKJr  SSKJr  SSKJ	r
  SSKJr  SSKJr  SSKJr  SS	KJr  SS
Kr/ SQr\
R*                  \
R,                  \
R.                  S.r\R2                  (       a1  \" \
R4                  5      S 5       r\" \
R6                  5      S 5       rO\
R4                  r\
R6                  r\" \
R8                  5      \4S j5       rS r\" \
R<                  \R>                  5      r\" \
R@                  \R                  5      r  CS r#\#" \
RH                  \R>                  5      r$\#" \
RJ                  \R                  5      r% C#S r&\
RN                  \
RP                  \
RR                  S.r*S r+\" \
RX                  5      S 5       r,S r-S r.\
R^                  \
R`                  S.r1S r2\" \
Rf                  5      S 5       r3g
! \! a
  r" S
r"C"NS
r"C"ff = f! \! a
  r" S
r"C"NS
r"C"ff = f)z/Exceptional cases that need some extra wrapping    )arrays)GLfloatArray)lazy)GL_1_1)_errors)bytes)_configflags)NULLN)glBeginglCallListsglColorglDeleteTexturesglEndglMap1dglMap1fglMap2dglMap2f
glMaterialglRasterPosglTexParameterglVertexglAreTexturesResident)         c                 N    [         R                  R                  5         U " U5      $ )zCBegin GL geometry-definition mode, disable automatic error checking)r   _error_checkeronBegin)baseFunctionmodes     O/home/wildlama/miniconda3/lib/python3.13/site-packages/OpenGL/GL/exceptional.pyr   r   $   s!     	&&)T##    c                 L    [         R                  R                  5         U " 5       $ )zFFinish GL geometry-definition mode, re-enable automatic error checking)r   r   onEnd)r   s    r!   r   r   )   s     	$$'r"   c                     U[         L a?  [        R                  R                  U5      n[        R                  R	                  U5      nOUnU " X5      $ )zDelete specified set of textures

If array is *not* passed then `size` must be a `GLuintArray`
compatible object which can be sized using `arraySize`, the 
result of which will be used as size.
)_NULLr   GLuintArrayasArray	arraySize)r   sizearrayptrs       r!   r   r   2   sG     ~  (($0!!++S2$$r"   c                 H   ^ ^ UU 4S jnT R                   Ul         T Ul        U$ )Nc                 p   > TR                  U5      nTR                  U5      u  pxn	X-  n
T" U XXX4XU5
      $ )zglMap2(target, u1, u2, v1, v2, points[][][]) -> None

This is a completely non-standard signature which doesn't allow for most
of the funky uses with strides and the like, but it has been like this for
a very long time...
r(   
dimensions)targetu1u2v1v2pointsr,   uordervordervstrideustride	arrayTyper   s              r!   glMap2glMap2.<locals>.glMap2C   sP     ) ) 4 4c ;g.
 	
r"   __name__r   )r   r;   r<   s   `` r!   r<   r<   B   s$    
$ #++FO&FMr"   c                 X   ^ ^ UU 4S jnUR                   T R                   :H    T Ul        U$ )Nc                 p   > TR                  U5      nTR                  U5      nUS   nUS   nT	" XX'Xd5      $ )zglMap1(target, u1, u2, points[][][]) -> None

This is a completely non-standard signature which doesn't allow for most
of the funky uses with strides and the like, but it has been like this for
a very long time...
r      r/   )
r1   r2   r3   r6   r,   dimsr7   r:   r;   r   s
           r!   glMap1glMap1.<locals>.glMap1`   sF     )##S*aq'V6@@r"   r>   )r   r;   rD   s   `` r!   rD   rD   _   s*    A OO|,,,&FMr"   c                  X    [        U 5      S:X  a  U S   n [        [        U 5         nU" U 6 $ )z+Choose glRasterPosX based on number of argsrB   r   )lenglRasterPosDispatch)argsfunctions     r!   r   r   v   s/    
4yA~Aw"CI/Hdr"   c                  T    [        U 5      S:X  a  U S   n [        [        U 5         " U 6 $ )z(Choose glVertexX based on number of argsrB   r   )rG   glVertexDispatch)rI   s    r!   r   r      s*    
4yA~AwSY(411r"   c           	         [        U5      (       d  [        U[        5      (       aR  U " [        U5      [        R                  [
        R                  " [        R                  R                  U5      5      5      $ [        R                  R                  U5      n[        R                  R                  U5      nU " U[        R                  [
        R                  " [        R                  R                  U5      5      5      $ U " U/UQ76 $ )zglCallLists( bytes( lists ) or lists[] ) -> None

Restricted version of glCallLists, takes a string or a GLuint compatible
array data-type and passes into the base function.
)rG   
isinstancer   fullGL_UNSIGNED_BYTEctypesc_void_pr   GLubyteArraydataPointerr'   r(   r)   GL_UNSIGNED_INT)r   listsrI   r,   r*   s        r!   r   r      s     t99ue%%E
%% 3 3 ? ? HI 
   ((%1!!++S2  OOV//;;C@A
 	

 '''r"   c                 *   [        U[        5      (       a  [        R                  " XU5      $ [        U[        5      (       a  [        R
                  " XU5      $ [        R                  " U[        R                  5      n[        R                  " XU5      $ )zLSet a texture parameter, choose underlying call based on pname and parameter)
rN   floatrO   glTexParameterfintglTexParameterir   r(   GL_FLOATglTexParameterfv)r1   pname	parametervalues       r!   r   r      sk    9e%%##VI??	Y	%	%##VI??$$i@$$fU<<r"   c                     [        U5      S:X  aB  [        R                  " US   5      nUc  [        SU< 35      e[        R
                  " XU5      $ [        R                  " X/UQ76 $ )zglMaterial -- convenience function to dispatch on argument type

If passed a single argument in args, calls:
    glMaterialfv( faces, constant, args[0] )
else calls:
    glMaterialf( faces, constant, *args )
rB   r   zNull value in glMaterial: )rG   r   r(   
ValueErrorrO   glMaterialfvglMaterialf)facesconstantrI   args       r!   r   r      s_     4yA~""DG-;$HJJ  %3889499r"   )r   r   c                  x   [        U 5      nUS:X  aP  [        R                  R                  U S   5      n[        [        R                  R                  U5         nU" U5      $ US:X  a  [        R                  " U 6 $ US:X  a  [        R                  " U 6 $ US:X  a  [        R                  " U 6 $ [        SU < 35      e)zglColor*f* -- convenience function to dispatch on argument type

dispatches to glColor3f, glColor2f, glColor4f, glColor3f, glColor2f, glColor4f
depending on the arguments passed...
rB   r   r   r   r   z$Don't know how to handle arguments: )rG   r   r   r(   glColorDispatchr)   rO   	glColor2d	glColor3d	glColor4drb   )rI   arglenrg   rJ   s       r!   r   r      s     YF{!!))474"6#6#6#@#@##GH	1~~&&	1~~&&	1~~&&NOOr"   c                 6   [        U5      S:X  ad  US   n[        R                  R                  U5      n[        R                  R	                  U5      n[        R
                  R                  U45      nO[        U5      S:X  aT   [        US   5      nUS   n[        R                  R                  U5      n[        R
                  R                  U45      nO^[        U5      S:X  aD  Uu  p2n[        R                  R                  U5      n[        R
                  R                  U5      nO[        S5      e[        R                  R                  U5      n[        R
                  R                  U5      nU " X5U5      nU(       a  [        [        U5      5       H  nSXH'   M	     U$ ! [         aj    US   n[        R                  R                  U5      n[        R                  R	                  U5      nUS   n[        R
                  R                  U5      n Nf = f)aR  Allow both Pythonic and C-style calls to glAreTexturesResident

    glAreTexturesResident( arrays.GLuintArray( textures) )

or

    glAreTexturesResident( int(n), arrays.GLuintArray( textures), arrays.GLuboolean( output) )

or

    glAreTexturesResident( int(n), arrays.GLuintArray( textures) )

returns the output arrays.GLubooleanArray
rB   r   r   r   z2Expected 1 to 3 arguments to glAreTexturesResident)rG   r   r'   r(   r)   GLbooleanArrayzerosrZ   	TypeErrortypedPointerrange)	r   rI   texturesnoutput
texturePtr	outputPtrresultis	            r!   r   r      s     4yA~7%%--x9((2&&,,qd3	Ta	8T!WA AwH))118=H**001$7F	Ta 6%%--x9&&..8QSS##00(<J%%22F<I1)5Fs6{#AFI $M3  	=AwH))118=H"",,X6A!WF**22F<F	=s   F$ $A1HH)4__doc__OpenGLr   OpenGL.arrays.arraydatatyper   OpenGL.lazywrapperr   _lazyOpenGL.GL.VERSIONr   rO   OpenGL.raw.GLr   OpenGL._bytesr   r	   OpenGL._nullr
   r&   rQ   __all__glRasterPos2dglRasterPos3dglRasterPos4drH   ERROR_CHECKINGr   r   r   r<   r   GLdoubleArrayr   	NameErrorerrrD   r   r   r   
glVertex2d
glVertex3d
glVertex4drL   r   r   r   r   
glColor3fv
glColor4fvri   r   r    r"   r!   <module>r      s   5  4 , , !   & $   
DLL$ $ DJJ 
 llGJJE05 %  %, $,, 4 4
6
$,, 3 3
5	  $,, 4 4
6
$,, 3 3
5	  
2 ( (,=:" 
P, ""$1 %1w  		.  		s$   G G" GG"G2-G2