<?xml version="1.0" encoding="UTF-8"?>
<!--
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt for Python.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or (at your option) the GNU General
** Public license version 3 or any later version approved by the KDE Free
** Qt Foundation. The licenses are as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
-->
<typesystem package="PySide2.QtOpenGL">
  <load-typesystem name="QtWidgets/typesystem_widgets.xml" generate="no" />
  <load-typesystem name="templates/opengl_common.xml" generate="no" />

  <primitive-type name="GLbitfield"/>
  <primitive-type name="GLboolean"/>
  <primitive-type name="GLbyte"/>
  <primitive-type name="GLclampd"/>
  <primitive-type name="GLclampf"/>
  <primitive-type name="GLdouble"/>
  <primitive-type name="GLenum"/>
  <primitive-type name="GLfloat"/>
  <primitive-type name="GLint"/>
  <primitive-type name="GLshort"/>
  <primitive-type name="GLsizei"/>
  <primitive-type name="GLubyte"/>
  <primitive-type name="GLuint"/>
  <primitive-type name="GLushort"/>

  <rejection class="QGLColormap::QGLColormapData"/>
  <rejection class="QGLContext" field-name="currentCtx"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLboolean ?\*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLchar ?\*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLchar ?\*const"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLenum ?\*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLfloat ?\*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLfloat ?\[.*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLdouble ?\*$"/>
  <rejection class="^QGL.*$" argument-type="GLintptr"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLint64 ?\*$"/>
  <rejection class="^QGL.*$" argument-type="^(const )?GLsizei ?\*$"/>

  <namespace-type name="QGL">
    <enum-type name="FormatOption" flags="FormatOptions"/>
    <extra-includes>
        <include file-name="qgl.h" location="global"/>
    </extra-includes>
  </namespace-type>

  <value-type name="QGLColormap">
    <modify-function signature="setEntries(int,const unsigned int*,int)">
        <access modifier="private"/>
    </modify-function>
  </value-type>

  <value-type name="QGLFormat">
    <enum-type name="OpenGLContextProfile" since="4.7"/>
    <enum-type name="OpenGLVersionFlag" flags="OpenGLVersionFlags"/>
  </value-type>

  <rejection class="QGLContext" field-name="currentCtx"/>
  <object-type name="QGLContext">
    <enum-type name="BindOption" flags="BindOptions" since="4.6"/>
    <modify-function signature="chooseContext(const QGLContext*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>
    <modify-function signature="create(const QGLContext*)">
        <modify-argument index="1" invalidate-after-use="yes"/>
    </modify-function>

    <!-- ### Obsolete functions and ctors -->
    <modify-function signature="QGLContext(const QGLFormat&amp;,QPaintDevice*)" remove="all"/>
    <!-- ### -->
  </object-type>
  <object-type name="QGLFramebufferObject">
    <enum-type name="Attachment"/>
  </object-type>
  <object-type name="QGLPixelBuffer">
    <extra-includes>
        <include file-name="QImage" location="global"/>
    </extra-includes>
  </object-type>
  <object-type name="QGLWidget">
    <extra-includes>
        <include file-name="QImage" location="global"/>
        <include file-name="QPixmap" location="global"/>
    </extra-includes>
    <modify-function signature="QGLWidget(QGLContext*,QWidget*,const QGLWidget*,QFlags&lt;Qt::WindowType&gt;)">
      <modify-argument index="1">
        <parent index="this" action="add"/>
      </modify-argument>
      <modify-argument index="this">
        <parent index="2" action="add"/>
      </modify-argument>
    </modify-function>
    <!-- ### Not part of Qt public API -->
    <modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all"/>
    <!-- ### -->
    <!--- ### Obsolete functions -->
    <modify-function signature="setFormat(QGLFormat)" remove="all"/>
    <!-- ### -->
  </object-type>

  <value-type name="QGLFramebufferObjectFormat" since="4.6"/>
  <object-type name="QGLShader" since="4.6">
    <enum-type name="ShaderTypeBit" flags="ShaderType"/>
  </object-type>

  <object-type name="QGLShaderProgram" since="4.6">
    <!-- setAttributeArray -->
    <modify-function signature="setAttributeArray(int,const QVector2D*,int)" rename="setAttributeArray2D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector2D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setAttributeArray(int,const QVector3D*,int)" rename="setAttributeArray3D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector3D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setAttributeArray(int,const QVector4D*,int)" rename="setAttributeArray4D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector4D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setAttributeArray(const char*,const QVector2D*,int)" rename="setAttributeArray2D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector2D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setAttributeArray(const char*,const QVector3D*,int)" rename="setAttributeArray3D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector3D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setAttributeArray(const char*,const QVector4D*,int)" rename="setAttributeArray4D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="%3"/>
                <replace from="$ARG1" to="%3"/>
                <replace from="$ATTR_TYPE" to="QVector4D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <!-- setUniformValueArray -->
    <modify-function signature="setUniformValueArray(int,const GLint*,int)" rename="setUniformValueArrayInt">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
            <array/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="GLint"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const GLuint*,int)" rename="setUniformValueArrayUint">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
            <array/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="GLuint"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QVector2D*,int)" rename="setUniformValueArray2D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector2D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QVector3D*,int)" rename="setUniformValueArray3D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector3D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QVector4D*,int)" rename="setUniformValueArray4D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector4D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix2x2*,int)" rename="setUniformValueArray2x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix2x3*,int)" rename="setUniformValueArray2x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix2x4*,int)" rename="setUniformValueArray2x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix3x2*,int)" rename="setUniformValueArray3x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix3x3*,int)" rename="setUniformValueArray3x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix3x4*,int)" rename="setUniformValueArray3x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix4x2*,int)" rename="setUniformValueArray4x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix4x3*,int)" rename="setUniformValueArray4x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(int,const QMatrix4x4*,int)" rename="setUniformValueArray4x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const GLint*,int)" rename="setUniformValueArrayInt">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
            <array/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="GLint"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const GLuint*,int)" rename="setUniformValueArrayUint">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
            <array/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="GLuint"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QVector2D*,int)" rename="setUniformValueArray2D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector2D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QVector3D*,int)" rename="setUniformValueArray3D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector3D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QVector4D*,int)" rename="setUniformValueArray4D">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QVector4D"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix2x2*,int)" rename="setUniformValueArray2x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix2x3*,int)" rename="setUniformValueArray2x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix2x4*,int)" rename="setUniformValueArray2x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix2x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix3x2*,int)" rename="setUniformValueArray3x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix3x3*,int)" rename="setUniformValueArray3x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix3x4*,int)" rename="setUniformValueArray3x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix3x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix4x2*,int)" rename="setUniformValueArray4x2">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x2"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix4x3*,int)" rename="setUniformValueArray4x3">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x3"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <modify-function signature="setUniformValueArray(const char*,const QMatrix4x4*,int)" rename="setUniformValueArray4x4">
        <modify-argument index="2" >
            <replace-type modified-type="PySequence"/>
        </modify-argument>
        <modify-argument index="3">
             <remove-argument />
        </modify-argument>
        <inject-code>
            <insert-template name="callArrayFunction">
                <replace from="$ARG0" to="_size"/>
                <replace from="$ARG1" to="0"/>
                <replace from="$ATTR_TYPE" to="QMatrix4x4"/>
            </insert-template>
        </inject-code>
    </modify-function>

    <!-- ### Use QMatrixZxY overloads -->
    <modify-function signature="setAttributeArray(int,GLenum,const void*,int,int)" remove="all" since="4.7"/>
    <modify-function signature="setAttributeArray(const char*,GLenum,const void*,int,int)" remove="all" since="4.7"/>
    <!-- ### -->
  </object-type>

  <!-- Qt 4.7 -->
  <object-type name="QGLBuffer" since="4.7">
    <enum-type name="Access" since="4.7"/>
    <enum-type name="Type" since="4.7"/>
    <enum-type name="UsagePattern" since="4.7"/>
    <modify-function signature="allocate(const void*,int)">
      <modify-argument index="1">
        <replace-type modified-type="QByteArray&amp;"/>
      </modify-argument>
      <modify-argument index="2">
        <replace-default-expression with="-1"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtopengl.cpp" snippet="qglbuffer-allocate"/>
    </modify-function>
    <modify-function signature="map(QGLBuffer::Access)">
      <inject-code file="../glue/qtopengl.cpp" snippet="qglbuffer-map"/>
    </modify-function>
    <modify-function signature="read(int,void*,int)">
      <modify-argument index="2">
        <remove-argument/>
      </modify-argument>
      <modify-argument index="return">
        <replace-type modified-type="(retval, data)"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtopengl.cpp" snippet="qglbuffer-read"/>
    </modify-function>
    <modify-function signature="write(int,const void*,int)">
      <modify-argument index="2">
        <replace-type modified-type="QByteArray&amp;"/>
      </modify-argument>
      <modify-argument index="3">
        <replace-default-expression with="-1"/>
      </modify-argument>
      <inject-code class="target" position="beginning" file="../glue/qtopengl.cpp" snippet="qglbuffer-write"/>
    </modify-function>
  </object-type>

</typesystem>
