lcnr/crow

Example does not run

nickeb96 opened this issue · 5 comments

It panics with "gl function was not loaded". Here's the full stacktrace:

warning: unused import: `DrawConfig`
 --> src/main.rs:4:14
  |
4 |     Context, DrawConfig, Texture,
  |              ^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/gameboy`
thread 'main' panicked at 'gl function was not loaded', /Users/Nick/workspace/rust/gameboy/target/debug/build/gl-a6881d9729a1f381/out/bindings.rs:20624:13
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86
   1: backtrace::backtrace::trace_unsynchronized
             at /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66
   2: std::sys_common::backtrace::_print_fmt
             at src/libstd/sys_common/backtrace.rs:78
   3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
             at src/libstd/sys_common/backtrace.rs:59
   4: <&mut W as core::fmt::Write>::write_fmt
   5: std::io::Write::write_fmt
             at src/libstd/io/mod.rs:1428
   6: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:62
   7: std::sys_common::backtrace::print
             at src/libstd/sys_common/backtrace.rs:49
   8: std::panicking::default_hook::{{closure}}
             at src/libstd/panicking.rs:204
   9: std::panicking::default_hook
             at src/libstd/panicking.rs:224
  10: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:470
  11: crossbeam_epoch::internal::Global::try_advance
  12: gl::missing_fn_panic
             at ./target/debug/build/gl-a6881d9729a1f381/out/bindings.rs:20624
  13: gl::DebugMessageCallback
             at ./target/debug/build/gl-a6881d9729a1f381/out/bindings.rs:1749
  14: crow::backend::Backend::initialize
             at /Users/Nick/.cargo/registry/src/github.com-1ecc6299db9ec823/crow-0.3.2/src/backend/mod.rs:105
  15: crow::Context::new
             at /Users/Nick/.cargo/registry/src/github.com-1ecc6299db9ec823/crow-0.3.2/src/lib.rs:226
  16: gameboy::main
             at src/main.rs:9
  17: std::rt::lang_start::{{closure}}
             at /rustc/823ff8cf1397a5772b1f6954b60576202bf91836/src/libstd/rt.rs:67
  18: std::rt::lang_start_internal::{{closure}}
             at src/libstd/rt.rs:52
  19: std::panicking::try::do_call
             at src/libstd/panicking.rs:303
  20: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:86
  21: std::panicking::try
             at src/libstd/panicking.rs:281
  22: std::panic::catch_unwind
             at src/libstd/panic.rs:394
  23: std::rt::lang_start_internal
             at src/libstd/rt.rs:51
  24: std::rt::lang_start
             at /rustc/823ff8cf1397a5772b1f6954b60576202bf91836/src/libstd/rt.rs:67
  25: gameboy::main
lcnr commented

Thank you for trying out crow and opening this issue!

glDebugMessageCallback requires OpenGL 4.3. I want to support lower OpenGL versions, so this should be fixed soon™ .

Do you know the supported OpenGL version of your setup?

Unfortunately, it looks like I only have OpenGL 4.1 :(

lcnr commented

Can you try using the current master? glDebugMessageCallback has been removed and I have checked the required version of most functions, so it might work now.

If it works for you I am going to publish this as version 0.4.0

I just tried out the example again using the master branch and it works perfectly. Thanks for your help quick fixes

lcnr commented

version 0.4 is now on crates.io