Archives week 36 of 2009

Sept. 7, 2009 - Sept. 13, 2009

Hack to map Vertex Buffer Objects into Numpy arrays...

This post from the numpy list shows you how to turn a ctypes c_void_p into a numpy array.  The glMapBuffer() function maps your currently-bound array into a void * which you can access directly... combining the two:

def map_buffer( vbo, access=GL_READ_WRITE ):
    """Map the given buffer into a numpy array..."""
    func = ctypes.pythonapi.PyBuffer_FromMemory
    func.restype = ...

Continue reading

Hard-linking and disk-space... whatever...

Toying yet more with compressing rdiff-backup repositories with hard-linking.  Turns out there's already someone who's done it.  My script for hard-link finding is different than the (packaged) one he's using, but it seems to have the same basic idea (I use filecmp, though, rather than reading the files myself, and I don't check owner/group/mode ...

Continue reading

Daily archives

Previous week

Week 35 of 2009

Next week

Week 37 of 2009

Archives