1
0
mirror of https://github.com/thp/pyotherside.git synced 2025-02-05 08:08:23 +08:00

116 Commits

Author SHA1 Message Date
Thomas Perl
3ce90c46ec Merge pull request #39 from dtomas/pyopengl
PyOpenGL in PyOtherSide
2015-02-21 19:54:41 +01:00
Dennis Tomas
37ba99e0bf Fixed GIL API usage in renderer. 2015-02-21 13:17:07 +01:00
Dennis Tomas
72925419c2 Implemented PyObjectRef::operator==. 2015-02-21 13:16:03 +01:00
Dennis Tomas
77ecb76492 Unified renderer interface for PyFBO and PyGLArea. 2015-02-21 13:15:49 +01:00
Dennis Tomas
092370631a Use proper way of synchronizing PyFbo and PyFboRenderer. 2015-02-21 13:15:32 +01:00
Dennis Tomas
1ec78f422e Don't clean up an uninitialized renderer. 2015-02-21 13:15:19 +01:00
Dennis Tomas
2662c423b4 Clean up PyGLRenderers before replacing them. 2015-02-21 13:15:05 +01:00
Dennis Tomas
00abfc8570 No need for PyGLRenderer to subclass QObject. 2015-02-21 13:14:44 +01:00
Dennis Tomas
1399072a9c Fixed API usage in PyGLArea example. 2015-02-21 13:14:32 +01:00
Dennis Tomas
b1cd1781d3 Use static_cast. 2015-02-21 13:14:16 +01:00
Dennis Tomas
6209cec9f2 OpenGL rendering to FBO. 2015-02-21 13:14:00 +01:00
Dennis Tomas
0ab3edabc5 Only disable automatic clearing when rendering before QML. 2015-02-21 13:13:39 +01:00
Dennis Tomas
177c5203dc Removed property PyGLArea.t (leftover from Qt tutorial). 2015-02-21 13:13:24 +01:00
Dennis Tomas
873d168444 Improved PyGLArea documentation, added example. 2015-02-21 13:13:10 +01:00
Dennis Tomas
eef5266555 Update PyGLArea when properties have changed. 2015-02-21 13:12:57 +01:00
Dennis Tomas
f08ab6be25 PyGLArea: Pass renderer object instead of function names. 2015-02-21 13:12:41 +01:00
Dennis Tomas
52e75e918f Added null-checks for callbacks. 2015-02-21 13:12:07 +01:00
Dennis Tomas
3e4ea6ee5f Recreate renderer when callbacks have been redefined. 2015-02-21 13:11:48 +01:00
Dennis Tomas
13d22c6e0f Print exceptions in renderer methods. 2015-02-21 13:11:19 +01:00
Dennis Tomas
e126e229e8 Removed some unused private members. 2015-02-21 13:10:59 +01:00
Dennis Tomas
f8de71d449 OpenGL rendering in python. 2015-02-21 13:10:38 +01:00
Thomas Perl
289e5ed616 PyOtherSide 1.4.0 1.4.0 2015-02-19 15:50:51 +01:00
Thomas Perl
efdc4467a9 docs/index.rst: Minor formatting fixes 2015-02-19 15:49:51 +01:00
Thomas Perl
cb7cf698de Merge pull request #38 from danvratil/master
Unbox QJSValue from QVariant in the GUI thread to prevent race condition...
2015-02-19 15:26:27 +01:00
Daniel Vrátil
1c0be92e41 Unbox QJSValue from QVariant in the GUI thread to prevent race condition in QML engine
Calling QJSValue::toVariant() can cause QJSValue to call into QML engine. Since
we perform this correction from QPythonWriter thread context, we end up calling
QML engine from non-GUI thread and causing race conditions and crashes.

This change performs the initial unboxing in QPython::call() and passes to
QPythonWriter the actual value of QJSValue in QVariant.

This fixes issue #36.
2015-02-16 11:19:45 +01:00
Thomas Perl
5b76536332 Add test case for GI import issue (Fixes #23) 2015-01-11 13:47:50 +01:00
Thomas Perl
5c31bde3da Don't register signal handlers (fixes #33) 2015-01-11 13:37:22 +01:00
Thomas Perl
a218e792c3 Merge pull request #31 from M4rtinK/master
PyOtherSide for Android build instructions
2014-11-16 12:42:53 +01:00
Martin Kolman
9d292e2f3a PyOtherSide for Android build instructions 2014-11-15 17:58:55 +01:00
Thomas Perl
26612b02ae Merge pull request #29 from greenaddress/qt5.4
Fixed compile errors after last Qt 5.4 patch
2014-11-11 12:20:53 +01:00
GreenAddress
a113f51db4 Fixed compile errors after last Qt 5.4 patch 2014-11-11 11:32:21 +01:00
Thomas Perl
dc94842773 QVariantConverter: Handle Qt 5.4 QJSValue-in-QVariant (Fixes #28) 2014-11-10 21:20:43 +01:00
Thomas Perl
8e0f99002d pythonlib_loader: Standard Library embedding 2014-11-07 23:02:01 +01:00
Thomas Perl
443dce1e54 Android compatibility fix
There's no need to load libpython globally on Android.
2014-11-07 23:01:31 +01:00
Thomas Perl
21b416a01e Print unhandled errors to the console 2014-10-12 11:24:54 +02:00
Thomas Perl
eccdad94ee Merge branch 'qobject-wrapper' 2014-10-11 19:35:12 +02:00
Thomas Perl
295ef81db1 Document pyotherside.QObject wrapper usage 2014-10-11 19:34:32 +02:00
Thomas Perl
78180ce840 Self-import pyotherside to prevent crashes
Otherwise pyotherside.QObject instances could not be used
if the same module didn't do a "import pyotherside".
2014-10-11 18:38:06 +02:00
Thomas Perl
65314f10a7 Free allocated resources 2014-10-10 13:53:47 +02:00
Thomas Perl
24cb511bc9 Avoid conversion of QObjectMethod objects 2014-10-10 13:14:09 +02:00
Thomas Perl
43f81e54e1 Implement proper Python wrapper objects 2014-10-10 13:05:45 +02:00
Thomas Perl
c24670ccd2 WIP QObject wrapper code 2014-10-09 11:30:18 +02:00
Thomas Perl
4ef3738805 Use PyObjectRef's automatic reference counting
Replace most Py_.*REF calls with PyObjectRef's automatic
memory management, with borrowed references.
2014-10-08 16:07:01 +02:00
Thomas Perl
5863efcfe9 Simplify API (remove callMethod again, merge into call)
callMethod(o, attr, ...) is just a special case of:
call(getattr(o, attr), ...)

Starting with import version 1.4, call() now accepts a
Python callable as alternative to the function name.
2014-10-08 15:13:54 +02:00
Thomas Perl
9bfce212ff Merge branch 'pyobject-wrapper' 2014-10-08 14:33:29 +02:00
Thomas Perl
df059cf5fe Bump API version to 1.4, update documentation 2014-10-08 14:33:05 +02:00
Thomas Perl
bbe98ae3ec Fix deadlock issues and GIL state handling 2014-10-08 14:05:25 +02:00
Thomas Perl
76bd73c370 Assignment operator for PyObjectRef + test 2014-10-08 13:34:38 +02:00
Thomas Perl
4619b95040 Add getattr() and callMethod() tests to test_wrapped 2014-10-08 13:00:08 +02:00
Thomas Perl
cc7bc11595 Converter: Only use PyObjectRef, add tests
The converter shouldn't need to deal with PyObject * itself, but use
only PyObjectRef, which takes care of reference already.

Make the GIL state management easier to read.

Add a small test that shows how to pass Python objects to/from QML.
2014-10-08 12:51:37 +02:00