aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtOpenGL
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-03-18 21:12:51 -0300
committerHugo Lima <hugo.lima@openbossa.org>2010-03-19 14:05:29 -0300
commitff3f3a9cf2efc3e51de83831ffba355abe61e701 (patch)
treea298685f7326f40ac380e0d1e187fb6bef5ec68f /PySide/QtOpenGL
parent637208c48821634dab3599673bef64b090cff1e8 (diff)
Bindings for QtOpenGL.
Reviewer: Anderson Lizardo <anderson.lizardo@openbossa.org> Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'PySide/QtOpenGL')
-rw-r--r--PySide/QtOpenGL/CMakeLists.txt50
-rw-r--r--PySide/QtOpenGL/typesystem_opengl.xml82
2 files changed, 132 insertions, 0 deletions
diff --git a/PySide/QtOpenGL/CMakeLists.txt b/PySide/QtOpenGL/CMakeLists.txt
new file mode 100644
index 000000000..0a7a95ccb
--- /dev/null
+++ b/PySide/QtOpenGL/CMakeLists.txt
@@ -0,0 +1,50 @@
+project(QtOpenGL)
+
+if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+ set(QtOpenGL_46_SRC )
+else()
+ set(QtOpenGL_46_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglframebufferobjectformat_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglshaderprogram_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglshader_wrapper.cpp
+ )
+endif()
+
+set(QtOpenGL_SRC
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qgl_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglcolormap_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglcontext_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglformat_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglframebufferobject_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglpixelbuffer_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qglwidget_wrapper.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL/qtopengl_module_wrapper.cpp
+ ${QtOpenGL_46_SRC}
+)
+
+execute_generator(opengl QtOpenGL_SRC "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_BINARY_DIR}:${QtGui_SOURCE_DIR}:${QtOpenGL_SOURCE_DIR}")
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${QT_QTOPENGL_INCLUDE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${SHIBOKEN_INCLUDE_DIR}
+ ${libpyside_SOURCE_DIR}
+ ${QtGui_BINARY_DIR}/PySide/QtGui/
+ ${QtCore_BINARY_DIR}/PySide/QtCore/
+ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtOpenGL)
+add_library(QtOpenGL MODULE ${QtOpenGL_SRC})
+set_target_properties(QtOpenGL PROPERTIES PREFIX "")
+target_link_libraries(QtOpenGL
+ pyside
+ ${PYTHON_LIBRARIES}
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY}
+ ${QT_QTOPENGL_LIBRARY})
+add_dependencies(QtOpenGL QtGui)
+
+# install
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtOpenGL.so
+ DESTINATION ${SITE_PACKAGE}/PySide)
+
diff --git a/PySide/QtOpenGL/typesystem_opengl.xml b/PySide/QtOpenGL/typesystem_opengl.xml
new file mode 100644
index 000000000..e23bd49d2
--- /dev/null
+++ b/PySide/QtOpenGL/typesystem_opengl.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<typesystem package="PySide.QtOpenGL">
+ <load-typesystem name="typesystem_gui.xml" generate="no" />
+
+ <rejection class="QGLColormap::QGLColormapData"/>
+ <rejection class="QGLWidget" function-name="setMouseTracking"/>
+
+ <enum-type name="QGL::FormatOption" flags="QGL::FormatOptions" force-integer="yes"/>
+ <enum-type name="QGLFormat::OpenGLVersionFlag" flags="QGLFormat::OpenGLVersionFlags"/>
+ <enum-type name="QGLFramebufferObject::Attachment"/>
+
+ <namespace-type name="QGL">
+ <extra-includes>
+ <include file-name="qgl.h" location="global"/>
+ </extra-includes>
+ </namespace-type>
+
+ <value-type name="QGLColormap">
+ <modify-function signature="operator=(QGLColormap)" remove="all"/>
+
+ <modify-function signature="setEntries(int,const unsigned int*,int)">
+ <access modifier="private"/>
+ </modify-function>
+ </value-type>
+
+ <value-type name="QGLFormat">
+ <modify-function signature="operator=(QGLFormat)" remove="all"/>
+ </value-type>
+
+ <object-type name="QGLContext">
+ <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>
+
+ <modify-function signature="getProcAddress(QString)const">
+ <remove/>
+ </modify-function>
+ <modify-field name="currentCtx" read="false" write="false"/>
+ <modify-function signature="setDevice(QPaintDevice*)">
+ <remove/>
+ </modify-function>
+ <modify-function signature="generateFontDisplayLists(QFont, int)" remove="all"/>
+ <modify-function signature="tryVisual(const QGLFormat&amp;, int)" remove="all"/>
+ <modify-function signature="chooseVisual()" remove="all"/>
+ </object-type>
+ <object-type name="QGLFramebufferObject"/>
+ <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>
+ <!--- Obsolete -->
+ <modify-function signature="setContext(QGLContext*,const QGLContext*,bool)" remove="all" />
+ <modify-function signature="fontDisplayListBase(QFont, int)" remove="all"/>
+ <modify-function signature="setFormat(QGLFormat)" remove="all"/>
+ </object-type>
+
+ <value-type name="QGLFramebufferObjectFormat"/>
+ <object-type name="QGLShader"/>
+ <object-type name="QGLShaderProgram">
+ <modify-function signature="setUniformValue(int, Array)" remove="all" />
+ <modify-function signature="setUniformValue(const char*, Array)" remove="all" />
+ <modify-function signature="setAttributeValue(int,const float*,int,int)" remove="all" />
+ <modify-function signature="setAttributeValue(const char*,const float*,int,int)" remove="all" />
+ </object-type>
+</typesystem>