jorio/CroMagRally

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.

Cro-Mac-Rally2

Cro-Mac-Rally1

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

jorio commented

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
    }

It works! Thanks a lot!!!!!! :-)

Cro-Mag-Rally-Linux-Power-PC-2

Cro-Mag-Rally-Linux-Power-PC-1

tobhe commented

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?

jorio commented

OK, I'll mainline this fix and I'll make a maintenance release soon.

jorio commented

The fix is in CMR 3.0.1. Feel free to reopen if you encounter more graphics issues.