Category archives: Snaking

Discussions of programming, particularly of programming Python

RSS feed of Snaking

Being pushy helps


I've been wanting to try out the two presentations for PyCon somewhere.  I'll probably inflict a version of the OpenGL one on PyGTA on Tuesday (minus the "migration" parts, as very few people here are already using PyOpenGL).  But I still needed a forum full of victims for the Profiling one.  I was very pushy ...

Continue reading

Long day's Dojo into AJAX

Spent the whole day working on Dojo widgets... seems I spend almost every day these past few months working on Dojo widgets.  The Dijits (as they call them) are far more robust than the per-page custom-coded stuff that I'm replacing, and we're winding up with a fairly generic collection of "things" from which we can ...

Continue reading

Fixed bug in generic attribute support

Working up the sample code for the "legacy free" section of the PyOpenGL talk for PyCon I discovered that the glVertexAttribPointer wrapper never got finished.  You could pass in c_void_pointers, but other than that it just wouldn't work.  Obviously not a lot of people using the generic attribute support in PyOpenGL... but then I knew ...

Continue reading

Audio Monitor for System Load in CSound (Using CSound from Python)


To try to help out with Seneca's presentation today on the Python interface to CSound I tried to create a small demonstration application. It shows the use of CSound's "real time" Python API, that is, the API that allows you to poke notes directly into the score buffer for playing.

bzr branch http://www.vrplumber.com/bzr/csound-monitor

glInterleavedArrays is deprecated...

Doing a bit of after-work hacking on the PyOpenGL presentation, just realized that glInterleavedArrays is deprecated.  It's pretty trivial to rewrite as array pointers when you have VBO objects:

glInterleavedArrays( GL_T2F_N3F_V3F, 0, data )

Becomes:

glEnable( GL_VERTEX_ARRAY )
glEnable( GL_NORMAL_ARRAY )
glEnable( GL_TEXTURE_COORD_ARRAY )
glVertexPointer( len(data), GL_FLOAT, 32, data+20 )
glNormalPointer( len(data), GL_FLOAT, 32, data+8 ...

Continue reading

Presentations are Roughed Out

Have the basic outline for the two PyCon presentations worked out now.  I'll need some more work to pull together really good sample code for the PyOpenGL one.  I added the ability to load multiple profile files to RunSnakeRun as I worked on the profiling presentation (one of those, "oh, yeah, I'm describing how to ...

Continue reading

Sure, I'm fine, but...

Realized today as I wrote the presentation for PyOpenGL that one of the bullet points "calculate the transform matrix yourself" is going to be a considerable challenge for new users of (Py)OpenGL.  OpenGLContext/PyVRML97 has code to do this already for its hierarchy of nodes, but it's a C-coded extension to have reasonable performance.

May need ...

Continue reading

Should make the VBO objects act as arrays if no implementation

As I'm going through the (rather mechanical) process of eliminating the deprecated OpenGL functionality from OpenGLContext, I'm discovering something I hadn't thought about before, when I was on the library providing side.  Namely that most of the time what you really want to do is to create the VBO and if there's no implementation, still ...

Continue reading

Adding Shader support to OpenGLContext scenegraph

Got distracted writing the presentation this evening.  I wanted a simple set of examples of shader usage, particularly with respect to replacing fixed-function pipeline operations (there's a number of partial solutions in the various OpenGL books I have on my bookshelf, but I haven't found anything that looks like a complete reimplementation, though there are ...

Continue reading

Need to make Py3D easier to maintain

Py3D was hacked together in a few hours.  At some point I need to switch to a submission-and-approval system rather than a manual editing system.  I get very far behind in tracking the various projects.  Ah, the infinite todo list...

[Update] also need to check the address when I hit "reply" on a message on ...

Continue reading