When loading image data, set the texture format to true value
When loading image data, set the texture format to true value

When porting this to OpenGLES2 / WebGL, I get errors in glTexSubImage2d,
resulting in the display of black textures, because internal format
of the image does not match the format. In WebGL, no implicit format
conversion is allowed, and the implementation may ignore it or give up
if they don't match.

This is from OpenGLES2 docs:

internalformat must match format. No conversion between formats is
supported during texture image processing. type may be used as a
hint to specify how much precision is desired, but a GL implementation may
choose to store the texture array at any internal resolution it chooses.

Since the earlier line (for compressed data) initializes the format
to the true value, I assume that this was simply an oversight in the
original code (hence the pull request)

I tested that the samples framework still works correctly after this
(linux mint 17.1 with intel Mesa drivers)

cbeck88/cegui-mirror,RealityFactory/CEGUI,arkana-fts/cegui,RealityFactory/CEGUI,cbeck88/cegui-mirror,RealityFactory/CEGUI,arkana-fts/cegui,RealityFactory/CEGUI,arkana-fts/cegui,cbeck88/cegui-mirror,arkana-fts/cegui,arkana-fts/cegui,cbeck88/cegui-mirror,cbeck88/cegui-mirror,RealityFactory/CEGUI