|
Allegro 4: red/blue swapped after screen mode change |
Andrew Gillett
Member #15,868
January 2015
|
See screenshot. The red and blue channels have been swapped, excluding the green background which is drawn using clear_to_color. The sprites are drawn with draw_rle_sprite. This happens only very occasionally, after changing screen mode. The color depth is set to 32 bit at the start of the program and never changes. I have not found a way to consistently repro this. |
bamccaig
Member #7,536
July 2006
|
Just FYI, you can embed images in the page using markdown (or XHTML) syntax: [https://d1cxvcw9gjxu2x.cloudfront.net/attachments/612067] becomes {"name":"612067","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/6\/764a192fc1b651b0f1bc5f05bac07f1a.png","w":1920,"h":1080,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/6\/764a192fc1b651b0f1bc5f05bac07f1a"} -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Allegro 4 isn't smart enough to automatically convert your bitmaps when the display format changes, so it has to do software conversion or no conversion at all, and simply because the display order is swapped, the colors will be swapped. Simple remedy - reload all your images when changing display modes. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Andrew Gillett
Member #15,868
January 2015
|
The weird thing is this only happens rarely. Regarding reloading images, does this mean I also have to reload any datafiles containing images? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Yes, data files have to be reloaded. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|