Raylib-J icon indicating copy to clipboard operation
Raylib-J copied to clipboard

Image does not load

Open ErickSenaGodinho opened this issue 8 months ago • 0 comments

Describe the bug When trying to load an image or a texture, the image cannot be loaded.

To Reproduce Steps to reproduce the behavior:

  1. Run the following code
  2. See error

Expected behavior The image should appear on the screen at coordinates (0,0)

Code

public static void main(String[] args) {
        Raylib rlj = new Raylib();
        rlj.core.InitWindow(800, 600, "Raylib-J Example");

        Texture2D texture = rlj.textures.LoadTexture("texture.png");

        while (!rlj.core.WindowShouldClose()){
            rlj.core.BeginDrawing();
            rlj.core.ClearBackground(Color.WHITE);
            rlj.textures.DrawTexture(texture, 0,0, Color.WHITE);
            rlj.core.EndDrawing();
        }
        rlj.textures.UnloadTexture(texture);
    }

Desktop:

  • OS: Windows

Additional context Raylib-J Version: 0.5.2

ErickSenaGodinho avatar May 30 '24 22:05 ErickSenaGodinho