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

set_screen_coordinates broken #197

Closed
osa1 opened this issue Oct 28, 2017 · 1 comment

Comments

@osa1
Copy link
Contributor

commented Oct 28, 2017

Code:

extern crate ggez;

use ggez::*;
use ggez::graphics::Rect;

pub fn main() {
    let conf = conf::Conf::new();
    let mut ctx = &mut Context::load_from_conf("foo", "bar", conf).unwrap();
    graphics::set_screen_coordinates(
        &mut ctx,
        Rect{x: 320f32, y: 240f32, w: 640f32, h: 480f32}
    );
}

(the Rect used is taken from the get_screen_coordinates documentation)

Output:

thread 'main' panicked at 'The top corner must be higher than the bottom corner.', /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.13.1/src/geometry/orthographic.rs:67:8
stack backtrace:
   0: std::sys::imp::backtrace::tracing::imp::unwind_backtrace
             at /checkout/src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at /checkout/src/libstd/sys_common/backtrace.rs:69
   2: std::panicking::default_hook::{{closure}}
             at /checkout/src/libstd/sys_common/backtrace.rs:58
             at /checkout/src/libstd/panicking.rs:381
   3: std::panicking::default_hook
             at /checkout/src/libstd/panicking.rs:397
   4: std::panicking::rust_panic_with_hook
             at /checkout/src/libstd/panicking.rs:577
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:538
   6: <nalgebra::geometry::orthographic::Orthographic3<N>>::new
             at ./<panic macros>:3
   7: nalgebra::core::cg::<impl nalgebra::core::matrix::Matrix<N, nalgebra::core::dimension::U4, nalgebra::core::dimension::U4, <nalgebra::core::default_allocator::DefaultAllocator as nalgebra::core::allocator::Allocator<N, nalgebra::core::dimension::U4, nalgebra::core::dimension::U4>>::Buffer>>::new_orthographic
             at /home/omer/.cargo/registry/src/github.com-1ecc6299db9ec823/nalgebra-0.13.1/src/core/cg.rs:108
   8: <ggez::graphics::GraphicsContextGeneric<ggez::graphics::GlBackendSpec>>::set_projection_rect
             at /home/omer/.cargo/git/checkouts/ggez-ed9d3cec31fdee53/2a0a0c8/src/graphics/mod.rs:612
   9: ggez::graphics::set_screen_coordinates
             at /home/omer/.cargo/git/checkouts/ggez-ed9d3cec31fdee53/2a0a0c8/src/graphics/mod.rs:867
  10: mong::main
             at src/main.rs:106
  11: __rust_maybe_catch_panic
             at /checkout/src/libpanic_unwind/lib.rs:99
  12: std::rt::lang_start
             at /checkout/src/libstd/panicking.rs:459
             at /checkout/src/libstd/panic.rs:361
             at /checkout/src/libstd/rt.rs:59
  13: main
  14: __libc_start_main
  15: _start
@icefoxen

This comment has been minimized.

Copy link
Contributor

commented Oct 29, 2017

Definitely related to #134 , yes.

@icefoxen icefoxen closed this Oct 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.