How can I modify pixels using SDL?
I have a slight problem: I can't modify the pixels of an SDL screen. Specifically, the following code doesn't work. Uint32 * pixels = (Uint32 *) screen -> pixels; screen -> pixels = pixels; This compiles, but it doesn't show anything. What am I missing? I had the following functions lying around for setting pixels in an SDL_Surface. There are two versions each for 32-bit, 24-bit, 16-bit and 8-bit surfaces. If you just want to set a single pixel, you would use the normal versions. But if you want to set a bunch of pixels, first you lock the surface, then you use the nolock version(named so