This is byte order dependent.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402598
This commit is contained in:
Sam Lantinga 2007-08-12 18:53:51 +00:00
parent e7a82e9f88
commit 438f7083d8

View file

@ -810,7 +810,9 @@ GL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
if (texture->format == SDL_PIXELFORMAT_RGB888) {
int i;
Uint8 *p = (Uint8 *) texturedata->pixels;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
p += 3;
#endif
for (i = texture->h * pitch / 4; i--;) {
*p = 0xff;
p += 4;