Category archives: Snaking
Discussions of programming, particularly of programming Python
Hacking the night away (Optimising with OpenGL-ctypes)
Written by
on
in
Snaking.
I added the ability to set a flag on the numpy format handler to raise errors when a numpy array is passed in that requires a copy to be passed to ctypes. The idea is that you can use it to catch unwanted copying (during development). Found quite a few instances in OpenGLContext where I ...
Josh, got your messages (No mail-server access here...)
Written by
on
in
Snaking.
Probably the easiest approach is to just give you (Josh) developer access to the PyOpenGL project for development work. (Josh is doing the Mac OS-X porting work).
I've added the missing arrayhelpers module to the project that Josh pointed out. Modifications to the error module from this weekend were intended to address the problems on ...!-->!-->
Beginning the porting work (Well, began...)
Written by
on
in
Snaking.
Got to the point of actually compiling the first project last night. I chose SimpleParse because it's a fairly straightforward extension but it's not stupid-simple like the various accellerator extensions. I obviously forgot to check in the changes from the last time I ported it to Win32 :( . I fixed one or two glaring ...
Almost done setting up the win32 toolchain (Downloading the last piece now... and for the next few hours)
Written by
on
in
Snaking.
I've got most of the system setup done for the Win32 compilation. I have the cygwin tools all installed and the major projects checked out. I've got the path and pathext setup for python and have easy-install installed. However, I'm missing a module that's sitting on the machine's (reiserfs) hard-disk un-checked-in (and thus unavailable to ...
Something sucks in redmond (PITA continues to be a pain)
Written by
on
in
Snaking.
I spent 3.5 hours last night installing and re-installing Windows 2000. Another few hours this morning/afternoon. Every time I installed any of the video drivers for the Leadtek card (Leadtek's or nVidia's) I wound up with a machine that couldn't display anything (even in safe mode) because the driver would always load and corrupt the ...
Go egg or go home (Setuptools seduces me...)
Written by
on
in
Snaking.
As of now I've introduced a dependency on setuptools into OpenGL-ctypes. The ability to readily define a published plug-in API is the thing that finally swayed me. It cleans up the array FormatHandler registration very nicely. It also makes a nice .egg, eventually should allow for automated installation, and generally is a lot simpler to ...
I suppose I will have to install Windows (Blech.)
Written by
on
in
Snaking.
With Python 2.5 out, probably need to build a binary of PyOpenGL-SWIG. That requires re-installing Windows (both machines are corrupt), then getting the whole MS-Toolkit compiler-chain re-built (double blech). Windows is a serious PITA.
The worst part is that I'm actually contributing to the monopoly-value of Windows (network effects) when I support libraries on it, ...!-->!-->
Hey buddy, looking for an Open Source Python job? (And other miscellany from PyGTA)
Written by
on
in
Snaking.
Had a good turnout at PyGTA last night. Aaron presented Panometric's (currently proprietary, may get open-sourced) web-application wiki. In essence this is a mechanism that allows users to edit an application's templates using a customised version of docutils that includes a number of directives for including e.g. auto-generated tables and the like. It works by ...
Ctypes arrays as storage format (Seems natural given the implementation...)
Written by
on
in
Snaking.
Today (and yesterday) I added support for making ctypes arrays first-class array-storage formats for OpenGL-ctypes. That is, you can do this:
import OpenGL
OpenGL.preferredArray( 'ctypesarrays' )
Before you import OpenGL functions in your application and array-producing calls will then use ctypes arrays for the produced arrays (i.e. glGet* will return ctypes arrays instead of Numpy ...!-->!-->
Adding a type for documentation in epydoc (ctypes "Functions" as routine data-types...)
Written by
on
in
Snaking.
As mentioned a few posts ago, I've been looking at how to make the OpenGL-ctypes auto-generated documentation useful. What I want to do is to register the ctypes "functions" as regular routines, with docstrings and preferably with structured meta-data such as the data-types of arguments, error-checker and the like displayed in a consistent way.
The ...!-->!-->