Skip to content

Bug: Red pixels appearing #363

@m4nd3l

Description

@m4nd3l

Version

1.90.0

What happened?

Basically, I have to render an image, without any red pixels, when I render it, like 5 red pixels appear, and I don't know why.
Code:
`java
public void ImGUI() {
int flags =
ImGuiWindowFlags.NoBackground |
ImGuiWindowFlags.NoDecoration |
ImGuiWindowFlags.NoCollapse |
ImGuiWindowFlags.NoDocking |
ImGuiWindowFlags.NoMove |
ImGuiWindowFlags.NoSavedSettings|
ImGuiWindowFlags.NoInputs;

    ImGui.begin("Main Menu", flags);
    if (!setPos) {
        ImGui.setWindowPos(Anchor.TOP_LEFT.getImVec2Position(50.0f, 50.0f));
        setPos = true;
    }

    Texture cozyFarmsTitleTexture = AssetPool.getTexture(Consts.COZYFARMS_TITLE_TEXTURE_AD);
    Sprite cozyFarmsTitle = new Sprite().setTexture(cozyFarmsTitleTexture);
    int cozyFarmsTitleTextureID = cozyFarmsTitle.getTextureID();
    float multiplier = 4.5f;
    float width = cozyFarmsTitle.getWidth() * multiplier;
    float height = cozyFarmsTitle.getHeight() * multiplier;
    Vector2f[] textureCoordinates = {
    new Vector2f(1, 1),
    new Vector2f(1, 0),
    new Vector2f(0, 0),
    new Vector2f(0, 1),
};

    ImGui.image(cozyFarmsTitleTextureID, width, height,
            textureCoordinates[2].x, textureCoordinates[0].y,
            textureCoordinates[0].x, textureCoordinates[2].y);

    ImGui.end();
}`

Actually everything works, but those 5 pixels appear

Reproduction

Load an image using ImGui.image(id, width, height, coord1, coord2, coord3, coord4)

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions