From 6410e94b966148dde81b5121e53a250d7b530d91 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 13 Jul 2008 23:36:59 +0900 Subject: python: New state tracker which exposes the pipe driver to python scripts. Still under development. Just barely works. --- src/gallium/state_trackers/python/README | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/gallium/state_trackers/python/README (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README new file mode 100644 index 0000000000..75341aa28c --- /dev/null +++ b/src/gallium/state_trackers/python/README @@ -0,0 +1,32 @@ +This directory contains Python bindings to Gallium3D. It looks like a state +tracker from the pipe driver perspective, and it looks like a pipe driver from +the python script perspective. + + +To build you'll need: +* Python (with development packages) +* SCons +* SWIG +* Python Imaging Library (for the samples) + +Invoke scons on the top dir as + + scons statetrackers=python + +To use do + + export PYTHONPATH=build/XXXX-XXXX-XXXX/gallium/state_trackers/python + +and then try running + + python src/gallium/state_trackers/python/samples/simple.py + +which should create a simple.png + + +This is still in experimental phase, and there many limitations to what you can +do with from Python. + + +-- +Jose Fonseca -- cgit v1.2.3 From 23e8c92543d95c216f3459a5618611c079e86174 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sat, 9 Aug 2008 15:07:40 +0100 Subject: python: Update the documentation. --- src/gallium/state_trackers/python/README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README index 75341aa28c..8ab88ab2f8 100644 --- a/src/gallium/state_trackers/python/README +++ b/src/gallium/state_trackers/python/README @@ -7,7 +7,7 @@ To build you'll need: * Python (with development packages) * SCons * SWIG -* Python Imaging Library (for the samples) +* Python Imaging Library with TK support (for the samples) Invoke scons on the top dir as @@ -19,9 +19,9 @@ To use do and then try running - python src/gallium/state_trackers/python/samples/simple.py + python src/gallium/state_trackers/python/samples/tri.py -which should create a simple.png +which should show a triangle. This is still in experimental phase, and there many limitations to what you can -- cgit v1.2.3 From 31bb6c0d17eb3265c9596bd25d5e6fabfefe4d61 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Thu, 14 Aug 2008 11:00:40 +0100 Subject: python: Update status. --- src/gallium/state_trackers/python/README | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README index 8ab88ab2f8..8f45fb6d1b 100644 --- a/src/gallium/state_trackers/python/README +++ b/src/gallium/state_trackers/python/README @@ -24,9 +24,10 @@ and then try running which should show a triangle. -This is still in experimental phase, and there many limitations to what you can -do with from Python. - +This is still work in progress: +- errors are not handled properly and almost always result in crash +- state atoms with array members are awkward to set +- there no efficient way to view images -- Jose Fonseca -- cgit v1.2.3 From 8ca95d812148209f78c1e2501c3183623dcae0b2 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 24 Mar 2009 21:24:31 +0000 Subject: python: Tweak instructions. --- src/gallium/state_trackers/python/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README index 8f45fb6d1b..942f3c06c4 100644 --- a/src/gallium/state_trackers/python/README +++ b/src/gallium/state_trackers/python/README @@ -11,11 +11,11 @@ To build you'll need: Invoke scons on the top dir as - scons statetrackers=python + scons debug=yes statetrackers=python driver=softpipe,trace To use do - export PYTHONPATH=build/XXXX-XXXX-XXXX/gallium/state_trackers/python + export PYTHONPATH=$PWD/build/XXXX-XXXX-XXXX/gallium/state_trackers/python and then try running -- cgit v1.2.3 From b52b78a2269e6f773fc02c9740e7f2e18cdf1699 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Tue, 24 Mar 2009 21:39:16 +0000 Subject: python: List packages needed on debian systems. --- src/gallium/state_trackers/python/README | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README index 942f3c06c4..4281d9bdb0 100644 --- a/src/gallium/state_trackers/python/README +++ b/src/gallium/state_trackers/python/README @@ -9,6 +9,10 @@ To build you'll need: * SWIG * Python Imaging Library with TK support (for the samples) +On a debian-based distro you can simply do: + + aptitude install python-dev scons swig python-imaging python-imaging-tk + Invoke scons on the top dir as scons debug=yes statetrackers=python driver=softpipe,trace -- cgit v1.2.3 From 29933fc6fec88e0c20e6ba4feebce10934eb48a3 Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 30 Mar 2009 12:12:37 +0100 Subject: python: Update instructions for windows. --- src/gallium/state_trackers/python/README | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/gallium/state_trackers/python/README') diff --git a/src/gallium/state_trackers/python/README b/src/gallium/state_trackers/python/README index 4281d9bdb0..e03d546830 100644 --- a/src/gallium/state_trackers/python/README +++ b/src/gallium/state_trackers/python/README @@ -6,20 +6,27 @@ the python script perspective. To build you'll need: * Python (with development packages) * SCons -* SWIG -* Python Imaging Library with TK support (for the samples) +* SWIG, http://www.swig.org/download.html +* Python Imaging Library with TK support, http://www.pythonware.com/products/pil/, + for the samples On a debian-based distro you can simply do: aptitude install python-dev scons swig python-imaging python-imaging-tk +On a Windows machine ensure the swig command is in your PATH. + Invoke scons on the top dir as - scons debug=yes statetrackers=python driver=softpipe,trace + scons debug=yes statetrackers=python drivers=softpipe,trace winsys=none + +To use it set PYTHONPATH appropriately, e.g, in Linux do: + + export PYTHONPATH=$PWD/build/linux-x86-debug/gallium/state_trackers/python -To use do +or (in Windows) - export PYTHONPATH=$PWD/build/XXXX-XXXX-XXXX/gallium/state_trackers/python + set PYTHONPATH=%CD%\build\windows-x86-debug\gallium\state_trackers\python and then try running @@ -31,7 +38,6 @@ which should show a triangle. This is still work in progress: - errors are not handled properly and almost always result in crash - state atoms with array members are awkward to set -- there no efficient way to view images -- -Jose Fonseca +Jose Fonseca -- cgit v1.2.3