Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux PPC: Graphics Issues #11

Closed
chzigotzky opened this issue Sep 30, 2022 · 5 comments
Closed

Linux PPC: Graphics Issues #11

chzigotzky opened this issue Sep 30, 2022 · 5 comments

Comments

@chzigotzky
Copy link

chzigotzky commented Sep 30, 2022

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
Copy link
Owner

jorio commented Sep 30, 2022

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
    }

@chzigotzky
Copy link
Author

chzigotzky commented Sep 30, 2022

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

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

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

@tobhe
Copy link

tobhe commented Feb 6, 2024

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
Copy link
Owner

jorio commented Feb 6, 2024

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

@jorio
Copy link
Owner

jorio commented Feb 7, 2024

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

@jorio jorio closed this as completed Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants