Linux PPC: Graphics Issues
chzigotzky opened this issue · 5 comments
Hi All,
First, many thanks for this game and thanks a lot for the big endian changes!
I was able to compile it on MintPPC and Void PPC today. It works but there are some graphics issues.
System:
- A-EON AmigaOne X5000/40 with 8GB RAM
- AMD Radeon HD6970 (Cayman XT)
- OpenGL version 3.1
- Mesa 22.2.0-rc3 on MintPPC (Debian Sid 32-bit)
- Mesa 22.1.7 on Void PPC 32-bit
- GCC version 10.2.1 on Void PPC
- GCC version 11.3.0 on MintPPC
- SDL 2.24 on Void PPC
- SDL 2.0.22 on MintPPC
I use the git version. (git clone --recurse-submodules https://github.com/jorio/CroMagRally)
Any ideas because of the graphics issues?
Thanks,
Christian
Looks like your GL driver incorrectly handles GL_RGB to GL_RGB5_A1 conversions.
In ReadMaterialTextureMap (bg3d.c), try forcing a straightforward GL_RGB to GL_RGB conversion like this:
/* COPY BASIC INFO */
if (data->numMipmaps == 0) // see if this is the first texture
{
data->width = textureHeader.width;
data->height = textureHeader.height;
data->pixelSrcFormat = textureHeader.srcPixelFormat; // internal format
data->pixelDstFormat = textureHeader.dstPixelFormat; // vram format
if (data->pixelSrcFormat == GL_RGB) // <------- ADD THIS
data->pixelDstFormat = GL_RGB; // <------- ADD THIS
}
I encountered the same bug under OpenBSD on a PowerBook G4. The change you suggested helped. Is there any chance we could get this fixed in tree?
OK, I'll mainline this fix and I'll make a maintenance release soon.
The fix is in CMR 3.0.1. Feel free to reopen if you encounter more graphics issues.