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

All examples: Could not compile shader_version. #200

Closed
KingOfThePirates opened this issue Apr 3, 2015 · 81 comments
Closed

All examples: Could not compile shader_version. #200

KingOfThePirates opened this issue Apr 3, 2015 · 81 comments

Comments

@KingOfThePirates
Copy link

I have tried desperately to use this game engine for 10 days now. I might just use C++, but I wanna use rust :(

I originally put this problem on a separate issue, PistonDevelopers/Piston-Tutorials#61, but I wasn't sure if it should have been a new issue instead.

me@me-desktop ~/piston-examples-master/gfx_cube $ cargo build --verbose
   Compiling gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#fda2ff26)
     Running `rustc /home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/lib.rs --crate-name gfx_macros --crate-type dylib -C prefer-dynamic -g -C metadata=996769dbcfbdc64a -C extra-filename=-996769dbcfbdc64a --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings`
   Compiling shader_version v0.0.5 (https://github.com/pistondevelopers/shader_version#a5e77d4c)
     Running `rustc /home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/lib.rs --crate-name shader_version --crate-type lib -g -C metadata=c0d3970179066072 -C extra-filename=-c0d3970179066072 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings`
   Compiling quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#35004891)
     Running `rustc /home/me/.cargo/git/checkouts/quaternion-d23494c4b16c3295/master/src/lib.rs --crate-name quaternion --crate-type lib -g -C metadata=40184a46e795eb20 -C extra-filename=-40184a46e795eb20 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern vecmath=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libvecmath-4b9e8c05387d4953.rlib -Awarnings`
   Compiling pistoncore-input v0.0.7 (https://github.com/pistondevelopers/input#9ad38f1f)
     Running `rustc /home/me/.cargo/git/checkouts/input-f00de8c7e2f06034/master/src/lib.rs --crate-name input --crate-type lib -g -C metadata=1490dbfb10945cbf -C extra-filename=-1490dbfb10945cbf --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern rustc_serialize=/home/me/piston-examples-master/gfx_cube/target/debug/deps/librustc_serialize-70d93d5334da1e4e.rlib --extern bitflags=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libbitflags-518ea12e21428edd.rlib -Awarnings`
   Compiling draw_state v0.0.5 (https://github.com/gfx-rs/draw_state#afea5101)
     Running `rustc /home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs --crate-name draw_state --crate-type lib -g -C metadata=9bf17f3a41afd6c4 -C extra-filename=-9bf17f3a41afd6c4 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern bitflags=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libbitflags-518ea12e21428edd.rlib -Awarnings`
   Compiling sdl2-sys v0.0.33 (https://github.com/AngryLawyer/rust-sdl2#37f657d4)
     Running `rustc /home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/lib.rs --crate-name sdl2_sys --crate-type lib -g --cfg feature="default" -C metadata=4e2764e28e66a0e3 -C extra-filename=-4e2764e28e66a0e3 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings -l SDL2`
   Compiling clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
     Running `rustc /home/me/.cargo/git/checkouts/clock_ticks-9428292a9c637b8e/master/src/lib.rs --crate-name clock_ticks --crate-type lib -g -C metadata=f89ed1b2a66f1f6e -C extra-filename=-f89ed1b2a66f1f6e --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
   Compiling gl_common v0.0.4
     Running `rustc /home/me/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/gl_common-0.0.4/src/lib.rs --crate-name gl_common --crate-type lib -g -C metadata=ec39142a57c733b7 -C extra-filename=-ec39142a57c733b7 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
   Compiling log v0.3.1
     Running `rustc /home/me/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/log-0.3.1/src/lib.rs --crate-name log --crate-type lib -g -C metadata=54cf393d3c69686f -C extra-filename=-54cf393d3c69686f --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 error: the trait `core::clone::Clone` is not implemented for the type `opengl::OpenGL` [E0277]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8 #[derive(Copy, PartialEq, Eq, PartialOrd, Ord)]
                                                                                                  ^~~~
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/opengl.rs:8:10: 8:14 note: expansion site
   Compiling gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
     Running `rustc /home/me/.cargo/git/checkouts/gl-rs-5020f97825182d66/master/gl_common/src/lib.rs --crate-name gl_common --crate-type lib -g -C metadata=ba78e2ee345cf946 -C extra-filename=-ba78e2ee345cf946 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern libc=/home/me/piston-examples-master/gfx_cube/target/debug/deps/liblibc-8c77960f0e8d4e86.rlib -Awarnings`
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 error: the trait `core::clone::Clone` is not implemented for the type `glsl::GLSL` [E0277]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13 #[derive(Copy, PartialOrd, Ord, PartialEq, Eq)]
                                                                                                 ^~~~
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/glsl.rs:13:10: 13:14 note: expansion site
error: aborting due to 2 previous errors
       Fresh quack v0.0.13 (https://github.com/PistonDevelopers/quack#6bcb6ac3)
       Fresh rustc-serialize v0.3.12
       Fresh vecmath v0.0.5 (https://github.com/PistonDevelopers/vecmath#62848645)
       Fresh khronos_api v0.0.5
       Fresh bitflags v0.1.1
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh libc v0.1.5
       Fresh xml-rs v0.1.23
Build failed, waiting for other jobs to finish...
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::Param` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22 #[derive(Copy, PartialEq, Debug)]
                                                                                                     ^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:22:10: 22:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::ParamError` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30 #[derive(Copy, Debug)]
                                                                                                     ^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:30:10: 30:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 error: the trait `core::clone::Clone` is not implemented for the type `shader_param::ShaderParam` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243 #[derive(Copy)]
                                                                                                      ^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/shader_param.rs:243:10: 243:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 error: the trait `core::clone::Clone` is not implemented for the type `vertex_format::Modifier` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26 #[derive(Copy, PartialEq)]
                                                                                                      ^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:26:10: 26:14 note: expansion site
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 error: the trait `core::clone::Clone` is not implemented for the type `vertex_format::VertexFormat` [E0277]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222 #[derive(Copy)]
                                                                                                       ^~~~
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/gfx_macros-20b8916c81d6b4ed/master/src/vertex_format.rs:222:10: 222:14 note: expansion site
error: aborting due to 5 previous errors
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 error: the trait `core::clone::Clone` is not implemented for the type `audio::SDL_AudioCVT` [E0277]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45 #[derive(Copy)]
                                                                                                      ^~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/audio.rs:45:10: 45:14 note: expansion site
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 error: the trait `core::clone::Clone` is not implemented for the type `touch::Finger` [E0277]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8 #[derive(PartialEq, Copy)]
                                                                                                                ^~~~
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 note: in expansion of #[derive_Copy]
/home/me/.cargo/git/checkouts/rust-sdl2-8facfb557b6c1670/master/sdl2-sys/src/touch.rs:8:21: 8:25 note: expansion site
error: aborting due to 2 previous errors
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170:24: 170:26 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170             mask_read: -1,
                                                                                                             ^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:170:26: 170:26 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171:25: 171:27 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171             mask_write: -1,
                                                                                                              ^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/state.rs:171:27: 171:27 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108:24: 108:26 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108             mask_read: -1,
                                                                                                           ^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:108:26: 108:26 help: add #![feature(negate_unsigned)] to the crate attributes to enable
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109:25: 109:27 error: unary negation of unsigned integers may be removed in the future
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109             mask_write: -1,
                                                                                                            ^~
/home/me/.cargo/git/checkouts/draw_state-1e8ed0c6197e116e/master/src/lib.rs:109:27: 109:27 help: add #![feature(negate_unsigned)] to the crate attributes to enable
error: aborting due to 4 previous errors
Could not compile `shader_version`.

Caused by:
  Process didn't exit successfully: `rustc /home/me/.cargo/git/checkouts/shader_version-7b6bcaf792adf596/master/src/lib.rs --crate-name shader_version --crate-type lib -g -C metadata=c0d3970179066072 -C extra-filename=-c0d3970179066072 --out-dir /home/me/piston-examples-master/gfx_cube/target/debug/deps --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps -Awarnings` (exit code: 101)
me@me-desktop ~/piston-examples-master/gfx_cube $
@KingOfThePirates
Copy link
Author

When all examples are fixed, I will close this issue. I'm using open gl 3_1 if that's useful info at all.

Progress:
deform broken, at least, at expected window::Size, found [_; 2], expected graphics::rectangle::Rectangle, found [_; 4], expected graphics::rectangle::Border, found _
gfx_cube broken, at least, at piston::window's CaptureCursor
image broken
paint broken, at least, at expected window::Size, found [_; 2]
sprite broken, at least, at expected window::Size, found [_; 2]
user_input broken, at least, at piston::window's DrawSize and could not find quack in piston

@Potpourri
Copy link
Member

Looks like you need cargo update, piston no more uses quack.

@KingOfThePirates
Copy link
Author

In gfx_cube:

me@me-desktop ~/piston-examples-master/gfx_cube $ cargo update
    Updating git repository `https://github.com/gfx-rs/gfx_device_gl`
    Updating git repository `https://github.com/PistonDevelopers/piston`
    Updating git repository `https://github.com/pistondevelopers/sdl2_window`
    Updating git repository `https://github.com/gfx-rs/gfx_macros`
    Updating git repository `https://github.com/PistonDevelopers/vecmath`
    Updating git repository `https://github.com/gfx-rs/gfx-rs`
    Updating git repository `https://github.com/PistonDevelopers/camera_controllers`
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating git repository `https://github.com/gfx-rs/draw_state`
    Updating git repository `https://github.com/pistondevelopers/event`
    Updating git repository `https://github.com/pistondevelopers/input`
    Updating git repository `https://github.com/pistondevelopers/window`
    Updating git repository `https://github.com/PistonDevelopers/event_loop`
    Updating git repository `https://github.com/tomaka/clock_ticks`
    Updating git repository `https://github.com/pistondevelopers/shader_version`
    Updating git repository `https://github.com/bjz/gl-rs`
    Updating git repository `https://github.com/AngryLawyer/rust-sdl2`
    Updating git repository `https://github.com/PistonDevelopers/quaternion.git`
    Updating git repository `https://github.com/PistonDevelopers/cam`
me@me-desktop ~/piston-examples-master/gfx_cube $ cargo build
   Compiling sdl2-sys v0.0.34 (https://github.com/AngryLawyer/rust-sdl2#9d04da95)
   Compiling gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#60148fd2)
   Compiling sdl2 v0.0.35 (https://github.com/AngryLawyer/rust-sdl2#9d04da95)
   Compiling pistoncore-sdl2_window v0.0.8 (https://github.com/pistondevelopers/sdl2_window#5f28c09b)
   Compiling gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#c2b42b22)
   Compiling piston-example-gfx_cube v0.0.0 (file:///home/me/piston-examples-master/gfx_cube)
src/main.rs:13:5: 13:23 error: unresolved import `piston::quack::Set`. Could not find `quack` in `piston`
src/main.rs:13 use piston::quack::Set;
                   ^~~~~~~~~~~~~~~~~~
src/main.rs:14:39: 14:52 error: unresolved import `piston::window::CaptureCursor`. There is no `CaptureCursor` in `piston::window`
src/main.rs:14 use piston::window::{ WindowSettings, CaptureCursor };
                                                     ^~~~~~~~~~~~~
error: aborting due to 2 previous errors
Could not compile `piston-example-gfx_cube`.

To learn more, run the command again with --verbose.
me@me-desktop ~/piston-examples-master/gfx_cube $ cargo build -v
       Fresh libc v0.1.5
       Fresh bitflags v0.1.1
       Fresh gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#22981219)
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh rustc-serialize v0.3.12
       Fresh shader_version v0.0.5 (https://github.com/pistondevelopers/shader_version#c85ca327)
       Fresh khronos_api v0.0.5
       Fresh gl_common v0.0.4
       Fresh sdl2-sys v0.0.34 (https://github.com/AngryLawyer/rust-sdl2#9d04da95)
       Fresh log v0.3.1
       Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh xml-rs v0.1.23
       Fresh draw_state v0.0.6 (https://github.com/gfx-rs/draw_state#c85bd73d)
       Fresh rand v0.3.7
       Fresh gl_generator v0.0.23 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gl_generator v0.0.23
       Fresh gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#60148fd2)
       Fresh sdl2 v0.0.35 (https://github.com/AngryLawyer/rust-sdl2#9d04da95)
       Fresh num v0.1.21
       Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
       Fresh vecmath v0.0.6 (https://github.com/PistonDevelopers/vecmath#19cde554)
       Fresh pistoncore-window v0.1.0 (https://github.com/pistondevelopers/window#b2174caf)
       Fresh quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#f6331f0d)
       Fresh gl v0.0.12 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gfx_gl v0.1.3
       Fresh pistoncore-event_loop v0.0.18 (https://github.com/PistonDevelopers/event_loop#9c099cb5)
       Fresh piston3d-cam v0.0.5 (https://github.com/PistonDevelopers/cam#d321919f)
       Fresh gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#c2b42b22)
       Fresh pistoncore-event v0.1.0 (https://github.com/pistondevelopers/event#0b3fffe0)
       Fresh piston v0.1.0 (https://github.com/PistonDevelopers/piston#b6c4f15a)
       Fresh pistoncore-sdl2_window v0.0.8 (https://github.com/pistondevelopers/sdl2_window#5f28c09b)
   Compiling piston-example-gfx_cube v0.0.0 (file:///home/me/piston-examples-master/gfx_cube)
     Running `rustc src/main.rs --crate-name piston_example_gfx_cube --crate-type bin -g --out-dir /home/me/piston-examples-master/gfx_cube/target/debug --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern camera_controllers=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libcamera_controllers-b17c5218204e890d.rlib --extern gfx_device_gl=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx_device_gl-8bc39e9326f736f4.rlib --extern vecmath=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libvecmath-8d97dbf9d32ca84b.rlib --extern gfx_macros=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx_macros-996769dbcfbdc64a.so --extern sdl2_window=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libsdl2_window-9404e8e0ea35ff63.rlib --extern piston=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libpiston-11b22452dfd51e1b.rlib --extern gfx=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx-071b9a54eef8c4dd.rlib`
       Fresh camera_controllers v0.0.2 (https://github.com/PistonDevelopers/camera_controllers#3a4cb227)
src/main.rs:13:5: 13:23 error: unresolved import `piston::quack::Set`. Could not find `quack` in `piston`
src/main.rs:13 use piston::quack::Set;
                   ^~~~~~~~~~~~~~~~~~
src/main.rs:14:39: 14:52 error: unresolved import `piston::window::CaptureCursor`. There is no `CaptureCursor` in `piston::window`
src/main.rs:14 use piston::window::{ WindowSettings, CaptureCursor };
                                                     ^~~~~~~~~~~~~
error: aborting due to 2 previous errors
Could not compile `piston-example-gfx_cube`.

Caused by:
  Process didn't exit successfully: `rustc src/main.rs --crate-name piston_example_gfx_cube --crate-type bin -g --out-dir /home/me/piston-examples-master/gfx_cube/target/debug --emit=dep-info,link -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug -L dependency=/home/me/piston-examples-master/gfx_cube/target/debug/deps --extern camera_controllers=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libcamera_controllers-b17c5218204e890d.rlib --extern gfx_device_gl=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx_device_gl-8bc39e9326f736f4.rlib --extern vecmath=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libvecmath-8d97dbf9d32ca84b.rlib --extern gfx_macros=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx_macros-996769dbcfbdc64a.so --extern sdl2_window=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libsdl2_window-9404e8e0ea35ff63.rlib --extern piston=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libpiston-11b22452dfd51e1b.rlib --extern gfx=/home/me/piston-examples-master/gfx_cube/target/debug/deps/libgfx-071b9a54eef8c4dd.rlib` (exit code: 101)
me@me-desktop ~/piston-examples-master/gfx_cube $

@Potpourri
Copy link
Member

You need to update repo git pull.

@KingOfThePirates
Copy link
Author

This is a new idea to me. I cannot find a good starting place to read up on this. I typed git pull and got fatal: Not a git repository (or any of the parent directories): .git Where do you recommend I start my research?

@Potpourri
Copy link
Member

Change directory to piston-examples and run git pull.

@Potpourri
Copy link
Member

If you didn't git clone and just downloaded zip. Then just download new version archive.

@KingOfThePirates
Copy link
Author

me@me-desktop ~/projects/piston-examples/gfx_cube $ cargo run
   Compiling piston-example-gfx_cube v0.0.0 (file:///home/me/projects/piston-examples/gfx_cube)
     Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'Invalid GLenum passed to `get_string`: 1f03', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/info.rs:131
An unknown error occurred

To learn more, run the command again with --verbose.
me@me-desktop ~/projects/piston-examples/gfx_cube $

@Potpourri
Copy link
Member

You need to open issue on gfx-rs/gfx_device_gl.

@bvssvni
Copy link
Member

bvssvni commented Apr 7, 2015

@KingOfThePirates You are been unlucky with all these breaking changes!

@KingOfThePirates
Copy link
Author

Just making the world a better place. I'm glad to be the first noobie to blaze this awesome trail :)

P.S. Having gl 3.1 instead of 3.2 wouldn't be the problem would it?

@kvark
Copy link
Member

kvark commented Apr 7, 2015

Ok, so gfx_cube requires GL-3.2, which is not supported by the target machine. Why doesn't it crash right away?

@kvark
Copy link
Member

kvark commented Apr 7, 2015

For an experiment, try changing GL version to 3.1 in here

@kvark
Copy link
Member

kvark commented Apr 7, 2015

Ideally, your (@bvssvni) SDL2 window should pick a version automatically. Forcing 3.2 makes it fail on the low-end systems, forcing 2.1 makes it fail on OSX.

@Potpourri
Copy link
Member

@kvark KingOfThePirates has changed to 3.1, otherwise SDL2 panics with "Could not create GL context".
About automatic choice of versions, we think about it.

@kvark
Copy link
Member

kvark commented Apr 7, 2015

@Potpourri huh, I see now. Maybe it's an SDL bug after all?

@KingOfThePirates could you please try running gfx_examples/cube? It should just work.

@KingOfThePirates
Copy link
Author

As long as the cube isn't intended to move, it works.

@kvark
Copy link
Member

kvark commented Apr 7, 2015

Thanks for the confirmation! So, again, this doesn't look to be a gfx issue. The context SDL2 creates for us is bad. Are there any piston samples that use GLFW/Glutin?

@Potpourri
Copy link
Member

user_input example

@KingOfThePirates
Copy link
Author

I'm not sure, but this works if I change _3_2 to _3_1: PistonDevelopers/Piston-Tutorials/getting-started

@kvark
Copy link
Member

kvark commented Apr 7, 2015

ok, so it's either SDL2 itself, or sdl_window

@Potpourri
Copy link
Member

Interestingly why this works with PistonDevelopers/Piston-Tutorials/getting-started? @KingOfThePirates can you try run other piston-examples?

@kvark
Copy link
Member

kvark commented Apr 7, 2015

Oh, I didn't realize the tutorial is also using SDL2. The difference is perhaps the fact gfx_cube tries to create it with MSAA on?

@KingOfThePirates
Copy link
Author

  • deform after changing opengl in code to 3.1: works
  • freetype after changing opengl in code to 3.1: works
  • gfx_cube after changing opengl in code to 3.1: does not work

Output and call back:

me@me-desktop ~/projects/piston-examples/gfx_cube $ cargo run -v
       Fresh khronos_api v0.0.5
       Fresh bitflags v0.1.1
       Fresh rustc-serialize v0.3.12
       Fresh libc v0.1.6
       Fresh gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#22981219)
       Fresh shader_version v0.0.6 (https://github.com/pistondevelopers/shader_version#14aa73be)
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh draw_state v0.0.7 (https://github.com/gfx-rs/draw_state#44a0aed1)
       Fresh xml-rs v0.1.23
       Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
       Fresh log v0.3.1
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh sdl2-sys v0.0.34 (https://github.com/AngryLawyer/rust-sdl2#8e00e516)
       Fresh gl_common v0.0.4
       Fresh rand v0.3.7
       Fresh gl_generator v0.0.23 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#3437b905)
       Fresh gl_generator v0.0.23
       Fresh sdl2 v0.0.35 (https://github.com/AngryLawyer/rust-sdl2#8e00e516)
       Fresh num v0.1.22
       Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
       Fresh vecmath v0.0.6 (https://github.com/PistonDevelopers/vecmath#19cde554)
       Fresh pistoncore-window v0.1.0 (https://github.com/pistondevelopers/window#3fbf2cc2)
       Fresh quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#f6331f0d)
       Fresh gl v0.0.12 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gfx_gl v0.1.3
       Fresh pistoncore-event_loop v0.1.0 (https://github.com/PistonDevelopers/event_loop#f353b457)
       Fresh piston3d-cam v0.0.5 (https://github.com/PistonDevelopers/cam#d321919f)
       Fresh gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#803ac30e)
       Fresh pistoncore-event v0.1.0 (https://github.com/pistondevelopers/event#0db9e0fa)
       Fresh piston v0.1.0 (https://github.com/PistonDevelopers/piston#a175c868)
       Fresh camera_controllers v0.0.2 (https://github.com/PistonDevelopers/camera_controllers#3a4cb227)
       Fresh pistoncore-sdl2_window v0.0.8 (https://github.com/pistondevelopers/sdl2_window#9a39e0dd)
       Fresh piston-example-gfx_cube v0.0.0 (file:///home/me/projects/piston-examples/gfx_cube)
     Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
Process didn't exit successfully: `target/debug/piston-example-gfx_cube` (exit code: 101)
me@me-desktop ~/projects/piston-examples/gfx_cube $ RUST_BACKTRACE=1 ./target/debug/piston-example-gfx_cube
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
stack backtrace:
   1:     0x7faf9cede7b8 - sys::backtrace::write::h4618bbda30a2c1fakHC
   2:     0x7faf9cee2347 - panicking::on_panic::h94b32ff0a2406463uUI
   3:     0x7faf9ced4e53 - rt::unwind::begin_unwind_inner::h310b6bce2d1d1820CzI
   4:     0x7faf9ced523f - rt::unwind::begin_unwind_fmt::h36e3246309d9c41dgyI
   5:     0x7faf9cea0792 - Device::check::h64e7ba404d44dc6fpqd
                        at /home/me/projects/piston-examples/gfx_cube/<std macros>:9
   6:     0x7faf9cea62d7 - Device::process::h471f960cccf658d00rd
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:540
   7:     0x7faf9cea79d5 - Device.gfx..Device::reset_state::h60054d86db30abd2M0d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:555
   8:     0x7faf9cea7c40 - Device.gfx..Device::submit::h5ae65c1207968eb2s1d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:561
   9:     0x7faf9cdcf25f - render::ext::device::Graphics<D, F>::end_frame::h2827007577518872091
                        at /home/me/.cargo/git/checkouts/gfx-rs-93bce98024942039/master/src/render/ext/device.rs:74
  10:     0x7faf9cd58330 - main::h71cd5ed00d645e32Jka
                        at src/main.rs:245
  11:     0x7faf9cee6068 - rust_try_inner
  12:     0x7faf9cee6055 - rust_try
  13:     0x7faf9cee3e9e - rt::lang_start::ha69071984e32814cXOI
  14:     0x7faf9cd585d4 - main
  15:     0x7faf9c251ec4 - __libc_start_main
  16:     0x7faf9cd55c48 - <unknown>
  17:                0x0 - <unknown>
me@me-desktop ~/projects/piston-examples/gfx_cube $

Cargo.toml

[package]
name = "piston-example-gfx_cube"
version = "0.0.0"
authors = ["Your Name <your@email.com>"]
keywords = []

[[bin]]
name = "piston-example-gfx_cube"
path = "src/main.rs"

[dependencies.piston]
git = "https://github.com/PistonDevelopers/piston"

[dependencies.pistoncore-sdl2_window]
git = "https://github.com/pistondevelopers/sdl2_window"

[dependencies.camera_controllers]
git = "https://github.com/PistonDevelopers/camera_controllers"

[dependencies.vecmath]
git = "https://github.com/PistonDevelopers/vecmath"

[dependencies.gfx]
git = "https://github.com/gfx-rs/gfx-rs"

[dependencies.gfx_device_gl]
git = "https://github.com/gfx-rs/gfx_device_gl"

[dependencies.gfx_macros]
git = "https://github.com/gfx-rs/gfx_macros"
  • image after changing opengl in code to 3.1: works
  • paint after changing opengl in code to 3.1: works
  • sprite after changing opengl in code to 3.1: works
  • user_input after changing opengl in code to 3.1: does not work

Output:

me@me-desktop ~/projects/piston-examples/user_input $ cargo run -v
    Updating git repository `https://github.com/pistondevelopers/sdl2_window`
Unable to update https://github.com/pistondevelopers/sdl2_window

Caused by:
  failed to fetch into /home/me/.cargo/git/db/sdl2_window-99fd7f1ca94d6f5b

Caused by:
  [12] SSL error: error:140E0114:SSL routines:SSL_shutdown:uninitialized
me@me-desktop ~/projects/piston-examples/user_input $

Cargo.toml

[package]
name = "piston-example-user_input"
version = "0.0.0"
authors = ["Your Name <your@email.com>"]
keywords = []

[[bin]]
name = "piston-example-user_input"
path = "src/main.rs"

[dependencies.piston]
git = "https://github.com/PistonDevelopers/piston"

[dependencies.pistoncore-sdl2_window]
git = "https://github.com/pistondevelopers/sdl2_window"
optional = true

[dependencies.pistoncore-glfw_window]
git = "https://github.com/pistondevelopers/glfw_window"
optional = true

[dependencies.pistoncore-glutin_window]
git = "https://github.com/pistondevelopers/glutin_window"
optional = true

[dependencies.piston2d-opengl_graphics]
git = "https://github.com/pistondevelopers/opengl_graphics"

[dependencies.piston2d-graphics]
git = "https://github.com/pistondevelopers/graphics"

[features]
default = ["include_glutin"]
include_sdl2 = ["pistoncore-sdl2_window"]
include_glfw = ["pistoncore-glfw_window"]
include_glutin = ["pistoncore-glutin_window"]

@kvark
Copy link
Member

kvark commented Apr 8, 2015

This is a nice report, thanks! Could you try disabling MSAA for gfx_cube by deleting this line?

@KingOfThePirates
Copy link
Author

Done for the day- at work :(

Can get back to it tomorrow or overmorrow.

@kvark
Copy link
Member

kvark commented Apr 8, 2015

@KingOfThePirates I'm glad to know that you are not blocked by anything, at least. In the worst case just don't use SDL2.

@bvssvni
Copy link
Member

bvssvni commented Apr 8, 2015

So hard to get a window working now days!

@KingOfThePirates
Copy link
Author

Updated rust nightly.

Commenting out .sample(4), before doing git pull and cargo update:

me@me-desktop ~/projects/piston-examples/gfx_cube $ cargo run -v
       Fresh libc v0.1.6
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh khronos_api v0.0.5
       Fresh rustc-serialize v0.3.12
       Fresh bitflags v0.1.1
       Fresh gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#22981219)
       Fresh shader_version v0.0.6 (https://github.com/pistondevelopers/shader_version#14aa73be)
       Fresh gl_common v0.0.4
       Fresh log v0.3.1
       Fresh sdl2-sys v0.0.34 (https://github.com/AngryLawyer/rust-sdl2#8e00e516)
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
       Fresh draw_state v0.0.7 (https://github.com/gfx-rs/draw_state#44a0aed1)
       Fresh xml-rs v0.1.23
       Fresh rand v0.3.7
       Fresh gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#3437b905)
       Fresh gl_generator v0.0.23 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gl_generator v0.0.23
       Fresh sdl2 v0.0.35 (https://github.com/AngryLawyer/rust-sdl2#8e00e516)
       Fresh num v0.1.22
       Fresh vecmath v0.0.6 (https://github.com/PistonDevelopers/vecmath#19cde554)
       Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
       Fresh quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#f6331f0d)
       Fresh pistoncore-window v0.1.0 (https://github.com/pistondevelopers/window#3fbf2cc2)
       Fresh gl v0.0.12 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gfx_gl v0.1.3
       Fresh piston3d-cam v0.0.5 (https://github.com/PistonDevelopers/cam#d321919f)
       Fresh pistoncore-event_loop v0.1.0 (https://github.com/PistonDevelopers/event_loop#f353b457)
       Fresh gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#803ac30e)
       Fresh pistoncore-event v0.1.0 (https://github.com/pistondevelopers/event#0db9e0fa)
       Fresh piston v0.1.0 (https://github.com/PistonDevelopers/piston#a175c868)
       Fresh camera_controllers v0.0.2 (https://github.com/PistonDevelopers/camera_controllers#3a4cb227)
       Fresh pistoncore-sdl2_window v0.0.8 (https://github.com/pistondevelopers/sdl2_window#9a39e0dd)
       Fresh piston-example-gfx_cube v0.0.0 (file:///home/me/projects/piston-examples/gfx_cube)
     Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
Process didn't exit successfully: `target/debug/piston-example-gfx_cube` (exit code: 101)
me@me-desktop ~/projects/piston-examples/gfx_cube $ RUST_BACKTRACE=1 ./target/debug/piston-example-gfx_cube
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
stack backtrace:
   1:     0x7fb660c0f158 - sys::backtrace::write::ha8214f13d5f3db96kHC
   2:     0x7fb660c12e37 - panicking::on_panic::hb755452bdd8e366fuUI
   3:     0x7fb660c05773 - rt::unwind::begin_unwind_inner::hb3f2c887fc82a5f5CzI
   4:     0x7fb660c05b5f - rt::unwind::begin_unwind_fmt::ha957ac0e2ae8c06agyI
   5:     0x7fb660bd1172 - Device::check::h64e7ba404d44dc6fpqd
                        at /home/me/projects/piston-examples/gfx_cube/<std macros>:9
   6:     0x7fb660bd6cb7 - Device::process::h471f960cccf658d00rd
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:540
   7:     0x7fb660bd83b5 - Device.gfx..Device::reset_state::h60054d86db30abd2M0d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:555
   8:     0x7fb660bd8620 - Device.gfx..Device::submit::h5ae65c1207968eb2s1d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:561
   9:     0x7fb660aff25f - render::ext::device::Graphics<D, F>::end_frame::h2797849475514389144
                        at /home/me/.cargo/git/checkouts/gfx-rs-93bce98024942039/master/src/render/ext/device.rs:74
  10:     0x7fb660a8830e - main::hcc948caee18b5026Jka
                        at src/main.rs:245
  11:     0x7fb660c16b58 - rust_try_inner
  12:     0x7fb660c16b45 - rust_try
  13:     0x7fb660c1498e - rt::lang_start::h03ddd043f7527d51XOI
  14:     0x7fb660a885b4 - main
  15:     0x7fb65ff81ec4 - __libc_start_main
  16:     0x7fb660a85c48 - <unknown>
  17:                0x0 - <unknown>
me@me-desktop ~/projects/piston-examples/gfx_cube $

Commenting out .sample(4), after doing git pull and cargo update:

me@me-desktop ~/projects/piston-examples/gfx_cube $ cargo run -v
       Fresh libc v0.1.6
       Fresh bitflags v0.1.1
       Fresh rustc-serialize v0.3.12
       Fresh gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#22981219)
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh shader_version v0.0.6 (https://github.com/pistondevelopers/shader_version#14aa73be)
       Fresh khronos_api v0.0.5
       Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gl_common v0.0.4
       Fresh log v0.3.1
       Fresh xml-rs v0.1.23
       Fresh draw_state v0.0.7 (https://github.com/gfx-rs/draw_state#44a0aed1)
       Fresh rand v0.3.7
       Fresh gl_generator v0.0.23 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gl_generator v0.0.23
       Fresh gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#3437b905)
       Fresh num v0.1.22
       Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
       Fresh sdl2-sys v0.1.0 (https://github.com/AngryLawyer/rust-sdl2#103b85c0)
       Fresh vecmath v0.0.6 (https://github.com/PistonDevelopers/vecmath#19cde554)
       Fresh pistoncore-window v0.1.0 (https://github.com/pistondevelopers/window#3fbf2cc2)
       Fresh sdl2 v0.1.0 (https://github.com/AngryLawyer/rust-sdl2#103b85c0)
       Fresh quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#f6331f0d)
       Fresh gl v0.0.12 (https://github.com/bjz/gl-rs#3ebf1cfe)
       Fresh gfx_gl v0.1.3
       Fresh pistoncore-event_loop v0.1.0 (https://github.com/PistonDevelopers/event_loop#7f9a0f0f)
       Fresh piston3d-cam v0.0.5 (https://github.com/PistonDevelopers/cam#d321919f)
       Fresh gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#803ac30e)
       Fresh pistoncore-event v0.1.1 (https://github.com/pistondevelopers/event#65b9b575)
       Fresh piston v0.1.1 (https://github.com/PistonDevelopers/piston#4039164c)
       Fresh pistoncore-sdl2_window v0.0.8 (https://github.com/pistondevelopers/sdl2_window#76bcf3d6)
       Fresh camera_controllers v0.0.2 (https://github.com/PistonDevelopers/camera_controllers#3a4cb227)
       Fresh piston-example-gfx_cube v0.0.0 (file:///home/me/projects/piston-examples/gfx_cube)
     Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
Process didn't exit successfully: `target/debug/piston-example-gfx_cube` (exit code: 101)
me@me-desktop ~/projects/piston-examples/gfx_cube $ RUST_BACKTRACE=1 ./target/debug/piston-example-gfx_cube
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
stack backtrace:
   1:     0x7fd3f1ebe748 - sys::backtrace::write::ha8214f13d5f3db96kHC
   2:     0x7fd3f1ec2427 - panicking::on_panic::hb755452bdd8e366fuUI
   3:     0x7fd3f1eb4d63 - rt::unwind::begin_unwind_inner::hb3f2c887fc82a5f5CzI
   4:     0x7fd3f1eb514f - rt::unwind::begin_unwind_fmt::ha957ac0e2ae8c06agyI
   5:     0x7fd3f1e81202 - Device::check::h64e7ba404d44dc6fpqd
                        at /home/me/projects/piston-examples/gfx_cube/<std macros>:9
   6:     0x7fd3f1e86d47 - Device::process::h471f960cccf658d00rd
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:540
   7:     0x7fd3f1e88445 - Device.gfx..Device::reset_state::h60054d86db30abd2M0d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:555
   8:     0x7fd3f1e886b0 - Device.gfx..Device::submit::h5ae65c1207968eb2s1d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:561
   9:     0x7fd3f1daf2ef - render::ext::device::Graphics<D, F>::end_frame::h6430282824362030923
                        at /home/me/.cargo/git/checkouts/gfx-rs-93bce98024942039/master/src/render/ext/device.rs:74
  10:     0x7fd3f1d3820a - main::h85ef21506ffc7362Ika
                        at src/main.rs:241
  11:     0x7fd3f1ec6148 - rust_try_inner
  12:     0x7fd3f1ec6135 - rust_try
  13:     0x7fd3f1ec3f7e - rt::lang_start::h03ddd043f7527d51XOI
  14:     0x7fd3f1d384a4 - main
  15:     0x7fd3f1231ec4 - __libc_start_main
  16:     0x7fd3f1d35c48 - <unknown>
  17:                0x0 - <unknown>
me@me-desktop ~/projects/piston-examples/gfx_cube $

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@KingOfThePirates thanks! so it's not about MSAA then, must be something else that SDL2 is confused about.

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@KingOfThePirates Please let us know if the updated gfx_cube works for you. I'm still puzzled about why the SDL version doesn't work, so it would be useful to get back to this issue and play with the example a bit when you reach your immediate goals and get more experience with the libraries.

@KingOfThePirates
Copy link
Author

It does not work for me.
Output and call stack:

me@me-desktop ~/projects/piston-examples/gfx_cube $ cargo run -v
       Fresh glfw-sys v3.1.2
       Fresh semver v0.1.19
       Fresh bitflags v0.1.1
       Fresh shader_version v0.0.6 (https://github.com/PistonDevelopers/shader_version#14aa73be)
       Fresh khronos_api v0.0.5 (https://github.com/bjz/gl-rs#13cf0c7a)
       Fresh khronos_api v0.0.5
       Fresh gfx_macros v0.1.10 (https://github.com/gfx-rs/gfx_macros#22981219)
       Fresh libc v0.1.6
       Fresh rustc-serialize v0.3.12
       Fresh xml-rs v0.1.23
       Fresh draw_state v0.0.7 (https://github.com/gfx-rs/draw_state#44a0aed1)
       Fresh gl_common v0.0.4 (https://github.com/bjz/gl-rs#13cf0c7a)
       Fresh clock_ticks v0.0.5 (https://github.com/tomaka/clock_ticks#cdb6499b)
       Fresh log v0.3.1
       Fresh gl_common v0.0.4
       Fresh gfx v0.2.5 (https://github.com/gfx-rs/gfx-rs#3437b905)
       Fresh rand v0.3.7
       Fresh glfw v0.0.7 (https://github.com/bjz/glfw-rs#1c490be7)
       Fresh gl_generator v0.0.23 (https://github.com/bjz/gl-rs#13cf0c7a)
       Fresh gl_generator v0.0.23
       Fresh num v0.1.22
       Fresh pistoncore-input v0.0.9 (https://github.com/pistondevelopers/input#cb061504)
       Fresh vecmath v0.0.6 (https://github.com/PistonDevelopers/vecmath#19cde554)
       Fresh pistoncore-window v0.1.0 (https://github.com/pistondevelopers/window#3fbf2cc2)
       Fresh quaternion v0.0.5 (https://github.com/PistonDevelopers/quaternion.git#f6331f0d)
       Fresh gl v0.0.12 (https://github.com/bjz/gl-rs#13cf0c7a)
       Fresh gfx_gl v0.1.3
       Fresh pistoncore-event_loop v0.1.0 (https://github.com/PistonDevelopers/event_loop#7f9a0f0f)
       Fresh piston3d-cam v0.0.5 (https://github.com/PistonDevelopers/cam#d321919f)
       Fresh gfx_device_gl v0.2.3 (https://github.com/gfx-rs/gfx_device_gl#803ac30e)
       Fresh pistoncore-event v0.1.1 (https://github.com/pistondevelopers/event#65b9b575)
       Fresh piston v0.1.1 (https://github.com/PistonDevelopers/piston#e4b588cf)
       Fresh camera_controllers v0.0.2 (https://github.com/PistonDevelopers/camera_controllers#3a4cb227)
       Fresh pistoncore-glfw_window v0.0.7 (https://github.com/pistondevelopers/glfw_window#32a3d549)
       Fresh piston-example-gfx_cube v0.0.0 (file:///home/me/projects/piston-examples/gfx_cube)
     Running `target/debug/piston-example-gfx_cube`
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
Process didn't exit successfully: `target/debug/piston-example-gfx_cube` (exit code: 101)
me@me-desktop ~/projects/piston-examples/gfx_cube $ RUST_BACKTRACE=1 ./target/debug/piston-example-gfx_cube
thread '<main>' panicked at 'Error after executing command BindProgram(0): InvalidEnum', /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:194
stack backtrace:
   1:     0x7f66b369b398 - sys::backtrace::write::hf9641444b7fda6aeXNC
   2:     0x7f66b369f077 - panicking::on_panic::h303fd804c9aaf1ac1dJ
   3:     0x7f66b36900c3 - rt::unwind::begin_unwind_inner::h80d2c1b838ba24769SI
   4:     0x7f66b36904af - rt::unwind::begin_unwind_fmt::h3023e8b4dccc364dNRI
   5:     0x7f66b363a452 - Device::check::h64e7ba404d44dc6fpqd
                        at /home/me/projects/piston-examples/gfx_cube/<std macros>:9
   6:     0x7f66b363ff97 - Device::process::h471f960cccf658d00rd
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:540
   7:     0x7f66b3641695 - Device.gfx..Device::reset_state::h60054d86db30abd2M0d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:555
   8:     0x7f66b3641900 - Device.gfx..Device::submit::h5ae65c1207968eb2s1d
                        at /home/me/.cargo/git/checkouts/gfx_device_gl-ceded8a9e751584e/master/src/lib.rs:561
   9:     0x7f66b355414f - render::ext::device::Graphics<D, F>::end_frame::h16669696956679867372
                        at /home/me/.cargo/git/checkouts/gfx-rs-93bce98024942039/master/src/render/ext/device.rs:74
  10:     0x7f66b34cc7ea - main::hc69158ff944791eaIka
                        at src/main.rs:241
  11:     0x7f66b36a2da8 - rust_try_inner
  12:     0x7f66b36a2d95 - rust_try
  13:     0x7f66b36a0c1e - rt::lang_start::h721c56921a1abf3du8I
  14:     0x7f66b34cca84 - main
  15:     0x7f66b1ce9ec4 - __libc_start_main
  16:     0x7f66b34ca248 - <unknown>
  17:                0x0 - <unknown>
me@me-desktop ~/projects/piston-examples/gfx_cube $

Cargo.toml

[package]
name = "piston-example-gfx_cube"
version = "0.0.0"
authors = ["Your Name <your@email.com>"]
keywords = []

[[bin]]
name = "piston-example-gfx_cube"
path = "src/main.rs"

[dependencies.piston]
git = "https://github.com/PistonDevelopers/piston"

[dependencies.pistoncore-glfw_window]
git = "https://github.com/pistondevelopers/glfw_window"

[dependencies.camera_controllers]
git = "https://github.com/PistonDevelopers/camera_controllers"

[dependencies.vecmath]
git = "https://github.com/PistonDevelopers/vecmath"

[dependencies.gfx]
git = "https://github.com/gfx-rs/gfx-rs"

[dependencies.gfx_device_gl]
git = "https://github.com/gfx-rs/gfx_device_gl"

[dependencies.gfx_macros]
git = "https://github.com/gfx-rs/gfx_macros"

Shouldn't gfx_cube's Cargo.toml look more similar to user_input's?

@kvark
Copy link
Member

kvark commented Apr 9, 2015

Wow, so it's not about SDL/glfw?..

@Potpourri
Copy link
Member

Hmm, it seems it's not SDL2 fault.

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@KingOfThePirates you did change GL version to 3.1 and removed samples(4), did you?

@KingOfThePirates
Copy link
Author

I did change the GL version, but not remove samples(4).
Just removed samples(4), same error.

@kvark
Copy link
Member

kvark commented Apr 9, 2015

This is weird. Ok, what's the difference between gfx_cube and gfx_examples/cube? The use of glfw_window and graphics-unrelated (seemingly) piston events. Anything else?

@kvark
Copy link
Member

kvark commented Apr 9, 2015

One thing I found is that glfw_window (and presumably other windows too) gets all GL functions by itself. This is a duplicate work that gfx_device_gl does, so there is a room for better integration here, or maybe it's even related to our problem.

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@Potpourri
Copy link
Member

Yes, I know about it, but this not problem in SDL2 for me and other, although I have not support OpenGL profiles.

@Potpourri
Copy link
Member

@kvark you think the problem in context initialization?

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@Potpourri that's the only thing different between piston's gfx_cube and gfx_examples/cube. Both are on GLFW now, but piston is doing it via window_glfw, which does a lot more extra:

  • queries all GL functions
  • sets up the forward-compatible profile

@kvark
Copy link
Member

kvark commented Apr 9, 2015

@Potpourri see PistonDevelopers/window#56

What I'd like to see tested is gfx_cube with a modified window_glfw that doesn't touch GL and doesn't set the forward-compatible flag.

@KingOfThePirates
Copy link
Author

conrod/examples/all_widgets.rs works (after changing the GL version, of course) :D
conrod/examples/counter.rs works too :DDDDDDDDDDDDDDDDDDDDD

@KingOfThePirates
Copy link
Author

Hold on it's late at night so I'm in a daze, but I may not have done a git pull before trying gfx_cube when you last asked me to. I don't think I knew pot's changes went thru. I'll look at it in the morning.

@KingOfThePirates
Copy link
Author

Nvm, still the same problem.

@kvark
Copy link
Member

kvark commented Apr 10, 2015

@KingOfThePirates here are the possible ways to proceed for you:

  1. Play with gfx directly without using piston-window/event loop
  2. Play with piston & piston-graphics using opengl backend, thus not using gfx-rs
  3. Try to fix glfw_window (or sdl2_window) by removing GL initialization and forward-compatible flags from there. Perhaps, @Potpourri is able to assist by taking (partial) care of Allow creating pure window context without GL init window#56
  4. Do something entirely unrelated (try glium if you know GL)

@KingOfThePirates
Copy link
Author

I have a way to move forward (with conrod), but I want to fix this issue. If not now, then when I am better at programming.

@KingOfThePirates
Copy link
Author

Thank you for both of you guys' help on this. I hope I can be more useful later.

@kvark
Copy link
Member

kvark commented Apr 10, 2015

@KingOfThePirates just a heads up - we are still looking at your issue (on IRC), and we might need you to experiment a bit more.

@kvark
Copy link
Member

kvark commented Apr 10, 2015

@KingOfThePirates please try running the example from https://github.com/cmr/nice_glfw and post the output

@KingOfThePirates
Copy link
Author

I see it. I'm at work so I can't do any more experimenting.

@kvark
Copy link
Member

kvark commented Apr 14, 2015

@KingOfThePirates you could try anything with SDL2 again, since PistonDevelopers/sdl2_window#164 gives a chance.

@KingOfThePirates
Copy link
Author

I should have time today to test. About to do some family things this moment.

@KingOfThePirates
Copy link
Author

What file do you want me to try?

@bvssvni
Copy link
Member

bvssvni commented Apr 19, 2015

@KingOfThePirates Try the image, paint and deform examples.

@KingOfThePirates
Copy link
Author

Before my testing:

  1. Updated rust nightly.
  2. Did git pull.
  3. For each piston example, changed let opengl = OpenGL::_3_2; to let opengl = OpenGL::_3_1; and did cargo build, cargo update, and another cargo build.

image (runs and works)

me@me-desktop ~/projects/piston-examples/image $ cargo run
     Running `target/debug/piston-example-image`
me@me-desktop ~/projects/piston-examples/image $ cargo test
   Compiling piston-example-image v0.0.0 (file:///home/me/projects/piston-examples/image)
src/main.rs:16:1: 37:2 warning: function is never used: `main`, #[warn(dead_code)] on by default
src/main.rs:16 fn main() {
src/main.rs:17     let opengl = OpenGL::_3_1;
src/main.rs:18     let window = Sdl2Window::new(
src/main.rs:19         opengl,
src/main.rs:20         WindowSettings::new("piston-example-image", [300, 300])
src/main.rs:21         .exit_on_esc(true)
               ...
     Running target/debug/piston_example_image-729f6bc212ebc91d

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

me@me-desktop ~/projects/piston-examples/image $ 

paint (takes a very long time to do cargo run/cargo test, but runs and works)

me@me-desktop ~/projects/piston-examples/paint $ cargo run
   Compiling image v0.3.7 (https://github.com/pistondevelopers/image#22c86266)
   Compiling piston2d-opengl_graphics v0.0.14 (https://github.com/pistondevelopers/opengl_graphics#29317965)
   Compiling piston-example-paint v0.0.1 (file:///home/me/projects/piston-examples/paint)
     Running `target/debug/piston-example-paint`
me@me-desktop ~/projects/piston-examples/paint $ cargo test
   Compiling image v0.3.7 (https://github.com/pistondevelopers/image#22c86266)
   Compiling piston2d-opengl_graphics v0.0.14 (https://github.com/pistondevelopers/opengl_graphics#29317965)
   Compiling piston-example-paint v0.0.1 (file:///home/me/projects/piston-examples/paint)
src/main.rs:14:1: 56:2 warning: function is never used: `main`, #[warn(dead_code)] on by default
src/main.rs:14 fn main() {
src/main.rs:15     let opengl = OpenGL::_3_1;
src/main.rs:16     let (width, height) = (300, 300);
src/main.rs:17     let window = Sdl2Window::new(
src/main.rs:18         opengl,
src/main.rs:19         WindowSettings::new("piston-example-paint", (width, height))
               ...
     Running target/debug/piston_example_paint-133e5d36c0c5e2cf

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

me@me-desktop ~/projects/piston-examples/paint $ 

deform (runs and works)

me@me-desktop ~/projects/piston-examples/deform $ cargo run
     Running `target/debug/piston-examples-deform`
Click in the red square and drag.
Toggle grid with G.
Reset grid with R.
me@me-desktop ~/projects/piston-examples/deform $ cargo test
     Running target/debug/piston_examples_deform-b45936563bb3a95a

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

me@me-desktop ~/projects/piston-examples/deform $ 

freetype, sprite, and user_input have similar results, and all work.
gfx_cube does not build.

@bvssvni
Copy link
Member

bvssvni commented May 15, 2015

I'll close this, since it seems the issue was figured out.

@bvssvni bvssvni closed this as completed May 15, 2015
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

4 participants