mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-20 02:54:16 +00:00
Fixed color channels displacement on Big Endian targets
This commit is contained in:
parent
2f59a8792a
commit
c0ec1d5114
1 changed files with 7 additions and 1 deletions
|
@ -1751,6 +1751,12 @@ int SDL_Flip(SDL_Surface* screen)
|
||||||
const int width = screen->w;
|
const int width = screen->w;
|
||||||
const int height = screen->h;
|
const int height = screen->h;
|
||||||
|
|
||||||
|
#ifdef __LITTLE_ENDIAN__
|
||||||
|
static const GLenum format = GL_RGBA;
|
||||||
|
#else // __BIG_ENDIAN__
|
||||||
|
static const GLenum format = GL_ABGR_EXT;
|
||||||
|
#endif // __LITTLE_ENDIAN__
|
||||||
|
|
||||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8,
|
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8,
|
||||||
width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, screen->pixels);
|
width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, screen->pixels);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue