ķ
ÄnKc           @   s    d  Z  d d l m Z m Z m Z m Z d d l m Z m Z d d l m	 Z	 d d l
 Z
 d d l Td d l m Z d d l m Z e e  d d	   Z d S(
   sc  OpenGL extension EXT.multi_draw_arrays

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

Overview (from the spec)
	
	These functions behave identically to the standard OpenGL 1.1 functions
	glDrawArrays() and glDrawElements() except they handle multiple lists of
	vertices in one call. Their main purpose is to allow one function call
	to render more than one primitive such as triangle strip, triangle fan,
	etc.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/multi_draw_arrays.txt
i˙˙˙˙(   t   platformt	   constantst   constantt   arrays(   t
   extensionst   wrapper(   t   glgetN(   t   *(   t   lazy(   t   glDrawElementsc         C   sx   | d k	 rA xe t |  D]! } t | | | | | |  q Wn3 x0 t | |  D] \ } } t | | | |  qQ Wd S(   s6  Currently glMultiDrawElementsEXT is not working in the wrapper 
    
    We are replacing the code with a sequence of glDrawElements calls
    as per the spec for the function.  Basically we'd spend more effort
    making an array of array pointers than we would creating a simple
    iteration in Python.
    N(   t   Nonet   xrangeR	   t   zip(   t   baseOperationt   primtypet   countst   typt   indicest	   primcountt   it   c(    (    s@   C:\Python27\Lib\site-packages\OpenGL\GL\EXT\multi_draw_arrays.pyt   glMultiDrawElementsEXT   s
    	"(   t   __doc__t   OpenGLR    R   R   R   R   R   t	   OpenGL.GLR   t   ctypest#   OpenGL.raw.GL.EXT.multi_draw_arrayst   OpenGL.lazywrapperR   t   OpenGL.GL.pointersR	   R   R
   (    (    (    s@   C:\Python27\Lib\site-packages\OpenGL\GL\EXT\multi_draw_arrays.pyt   <module>   s   "
	