[Shiboken] Problem binding QtOpenGL classes and using glew

44 views
Skip to first unread message

Yann Lanthony

unread,
May 16, 2012, 8:18:01 AM5/16/12
to pys...@googlegroups.com
Hi,

I'am facing an issue.I try to bind a class that inherits QGLWidget, so I added in my typesystem file this line : 
<load-typesystem name="typesystem_opengl.xml" generate="no"/>
This typesystem adds an include to pyside_qtopengl_python.h at the top of the generated myModule_python.h file, and this file includes more or less directly gl.h. 
The problem is that I am using glew in my project and glew.h has to be included before gl.h, which is consequently not the case here.

It doesn't seem possible to include any file before the module includes (myModule_python.h):
// Module Includes
#include <pyside_qtcore_python.h>
#include <pyside_qtgui_python.h>
#include <pyside_qtopengl_python.h>

which could have been a way to fix this by including glew.h here.

Anyway, I found something to correct that but it's too much specific to my project. 
Maybe there is a know solution for this issue, something more generic ?

Thanks :)


Reply all
Reply to author
Forward
0 new messages