Rendering issue with Raylib in WSL

150 Views Asked by At

I'm creating a donkey kong like game and as of right now am just trying to render in both the background and the player character. The .png files(as texture2Ds) seems to render in correctly, but another wider and distorted image renders on top of it. The same code works on other non-WSL computers

Here is what renders

Here is my main game loop, but I'm not sure if any of the code is the issue as it works on computers that are not using WSL

    while (!WindowShouldClose())
    {
        if (IsKeyDown(KEY_RIGHT)) {
            bunny->velocity.x = 0.7;
        } else if (IsKeyDown(KEY_LEFT)) {
            bunny->velocity.x = -0.7;
        } else {
            bunny->velocity.x = 0;
        }

        if (IsKeyDown(KEY_UP)) {
                bunny->velocity.y = -0.7;
        } else {
                bunny->velocity.y = 1;
        }

        BeginDrawing();
            printf("A\n");

            ClearBackground(RAYWHITE);
            DrawTexture(background, 0, 0, RAYWHITE);
            printf("B\n");
            DrawSprite(bunny);
            printf("C\n");
            UpdatePhysics(bunny, 0, otherSprites, 6, lines, count);
        EndDrawing();
        count++;
    }

I have tried rendering the sprites in different order etc. but nothing I am changing within the code seems to be working.

0

There are 0 best solutions below