Use loaded flag to upate texture object, and image format when setting
pixels. Fixes #1830