piston_window icon indicating copy to clipboard operation
piston_window copied to clipboard

gfx upgrade causing panics during window creation for OpenGL 2.1

Open mmlinford opened this issue 8 years ago • 10 comments

Trying to build a simple example (main.rs.txt) with OpenGL 2.1 causes a panic while creating the window (error.txt). This happens on both my Fedora 23 virtualbox VM and on its Windows 10 x64 host.

It works fine for Windows when I do not use 2.1 . The last working version of piston_window was 0.45.0, before the gfx upgrade.

mmlinford avatar May 08 '16 20:05 mmlinford

Interesting! I could not reproduce any such error, just now.

I created the simple example, with the dependency specified there of piston_window 0.44.0. Ran OK. Then I changed the dependency to 0.47.0 and did "cargo clean" and "cargo update" (gfx was one of the updates). It still ran OK. So it must be something else than gfx.

This is with OpenGL 2.1, Debian 8.4 (Jessie) 64-bit, Rust 1.8 (Stable), using Rustup.

Bluebird45 avatar May 08 '16 22:05 Bluebird45

And you explicitly set it to 2.1 in your code (the one in the piston readme does not)?

mmlinford avatar May 08 '16 23:05 mmlinford

Yes, I pasted your code in place of the one in the readme, although they differ only in setting it to 2.1. I have to specify 2.1 on my system, for piston_window.

Bluebird45 avatar May 09 '16 00:05 Bluebird45

I have the same panic on Ubuntu 16.04 using OpenGL 2.1 explicitly.

jeandudey avatar May 09 '16 19:05 jeandudey

@jeandudey Is that a default installation of Ubuntu 16.04, or are there any customizations, for example of desktop environment? What version of Rust? I'll install it on a spare machine, to see if I can reproduce the fault.

Bluebird45 avatar May 09 '16 23:05 Bluebird45

Fresh version of Ubuntu (i've only modified the wallpaper for now :smile:) and rustc 1.8.0 (db2939409 2016-04-11) installed with multirust.

jeandudey avatar May 09 '16 23:05 jeandudey

@Bluebird45 just FYI in my case it was Rust 1.8 on both the Fedora VM and my Win10 machine. No custom desktop on Fedora, just the default (I think Gnome 3)

mmlinford avatar May 09 '16 23:05 mmlinford

Testing on the same computer with Windows 10 fails with: Failed to build PistonWindow: Couldn't find any pixel format that matches the criterias.

jeandudey avatar May 10 '16 16:05 jeandudey

Fails with the same error for me on Windows 7. It worked fine with 0.44.0, but after upgrading I get the error.

pengowen123 avatar Jul 07 '16 21:07 pengowen123

@jeandudey That might be because of the issue mesa had with sRGB settings. That issue should be fixed with the latest 18.* version. See https://github.com/PistonDevelopers/piston/issues/1202 for more information.

Cxarli avatar May 02 '18 17:05 Cxarli