rude wrote:I'm pretty sure that creating images from a buffer at run-time won't be an acceptable performance hit no matter where the data comes from. We probably need to code a special streaming image object if we even want it to be close to efficient.
I can think of plenty of ways that it would be useful to be able to generate/manipulate images in code at runtime, and I can think of at least one way that it can be done without too huge a performance hit.
What I'd suggest is to create a new class of image that is based on an in-memory bitmap. Ideally this image class would be a thin wrapper to the SDL Surface functions, would be for in-memory operations only and would have to be converted to a proper texture-based image for drawing to the screen.
So we'd have a couple of new love.graphics functions implementing various newSurface() functions (one for loading images, one for creating a fresh image of a specific size, etc) and a new object type (Surface?) with methods for the various graphics operations including pixel-level access, drawing primitives, extracting sub-surfaces, conversion to (and from?) a drawable Image, etc.