# HG changeset patch # User Sam Lantinga # Date 1186944831 0 # Node ID 741afd8402cf547acd373de14986cd820e6bdab1 # Parent 55a8bebf9ba6510126c833c70eb3237d21dcbf25 This is byte order dependent. diff -r 55a8bebf9ba6 -r 741afd8402cf src/video/SDL_renderer_gl.c --- a/src/video/SDL_renderer_gl.c Sun Aug 12 18:44:49 2007 +0000 +++ b/src/video/SDL_renderer_gl.c Sun Aug 12 18:53:51 2007 +0000 @@ -810,7 +810,9 @@ 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;