Hmm, this is kinda crappy as you completely copy the texture for every change.  This is how it used to be done on GL, but there might be faster methods.  It would be better if you instead could tell it to just update a portion of the texture.  That way renderers that support it can.  To do this I think the texture object needs to know that it should be updateable so it can keep m_pixels around.  i.e. move the pixel cache to the texture.