Skip to content

DrawRotatedDecal() distorts decals on Linux #415

@DsgnrFH

Description

@DsgnrFH

DrawRotatedDecal() cuts up, skews and stretches the image instead of rotating it properly (even when the angle is 0)
Reproduceable using:

class MyGame : public olc::PixelGameEngine
{
public:
    olc::Sprite* sprite;
    olc::Decal* decal;

    bool OnUserCreate() override
    {
        sprite = new olc::Sprite("image.png");
        decal = new olc::Decal(sprite);
        return true;
    }

    bool OnUserUpdate(float fElapsedTime) override
    {
        Clear(olc::BLACK);

        DrawRotatedDecal({200,200}, decal, 45.0f * 3.14159f/180.0f);
        return true;
    }
};

Results:
Image
Input image:
Image

System info:
OS: Fedora 42
GPU: Mesa Intel(R) Graphics (MTL)
OpenGL version: OpenGL ES 3.2 Mesa 25.1.9

P.S. Seems like the Develop branch doesn't have this problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions