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

Crash on latest versions #1404

Open
thesamet opened this issue Dec 16, 2024 · 1 comment
Open

Crash on latest versions #1404

thesamet opened this issue Dec 16, 2024 · 1 comment

Comments

@thesamet
Copy link

I was following the rotating square tutorial. It works well with the versions documented in the README.md. However, when trying to upgrade:

--- a/Cargo.toml
+++ b/Cargo.toml
-piston2d-graphics = "0.44.0"
-piston2d-opengl_graphics = "0.85.0"
+piston2d-graphics = "0.45.0"
+piston2d-opengl_graphics = "0.86.0"

I am getting

thread 'main' panicked at /home/thesamet/.cargo/registry/src/index.crates.io-6f17d22bba15001f/piston2d-opengl_graphics-0.86.0/src/back_end.rs:457:9:

    OpenGL function pointers must be loaded before creating the `Gl` backend!
    For more info, see the following issue on GitHub:
    https://github.com/PistonDevelopers/opengl_graphics/issues/103

Environment is NixOS and Wayland.

@DavideCanton
Copy link

I resolved by adding gl as a dependency and adding gl::load_with(|s| window.get_proc_address(s) as *const _);

I guess it should be done automatically in the future

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

2 participants