How do I modify textures in SDL with direct pixel access? I'm trying to use SDL LockTexture and SDL UnlockTexture for directly editing pixels in a texture. I'm using SDL 2.0. Setting the pixel value using the following code doesn't modify the texture void pixels int pitch SDL LockTexture(mytexture, NULL, amp pixels, amp pitch) Set pixel 100,100 to blue ((uint32 t )pixels) 100 100 255 SDL UnlockTexture(mytexture)