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

Example window failed in Windows 7 #952

Closed
hh9527 opened this issue Nov 7, 2017 · 9 comments
Closed

Example window failed in Windows 7 #952

hh9527 opened this issue Nov 7, 2017 · 9 comments

Comments

@hh9527
Copy link

hh9527 commented Nov 7, 2017

OS: Windows7-64
Rust: rustc 1.23.0-nightly (3b82e4c74 2017-11-05)
Toolchain: msvc

In my corporation's virtual desktop (Citrix based).

λ cargo run --example window
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target\debug\examples\window.exe`
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: NoAvailablePixelFormat', src\libcore\result.rs:906:4
stack backtrace:
   0: std::sys_common::backtrace::_print
             at C:\projects\rust\src\libstd\sys_common\backtrace.rs:92
   1: std::panicking::default_hook::{{closure}}
             at C:\projects\rust\src\libstd\panicking.rs:380
   2: std::panicking::default_hook
             at C:\projects\rust\src\libstd\panicking.rs:397
   3: std::panicking::rust_panic_with_hook
             at C:\projects\rust\src\libstd\panicking.rs:577
   4: std::panicking::begin_panic<alloc::string::String>
             at C:\projects\rust\src\libstd\panicking.rs:538
   5: std::panicking::begin_panic_fmt
             at C:\projects\rust\src\libstd\panicking.rs:522
   6: std::panicking::rust_begin_panic
             at C:\projects\rust\src\libstd\panicking.rs:498
   7: core::panicking::panic_fmt
             at C:\projects\rust\src\libcore\panicking.rs:71
   8: core::result::unwrap_failed<glutin::CreationError>
             at C:\projects\rust\src\libcore\macros.rs:23
   9: core::result::Result<glutin::GlWindow, glutin::CreationError>::unwrap<glutin::GlWindow,glutin::CreationError>
             at C:\projects\rust\src\libcore\result.rs:772
  10: window::main
             at .\examples\window.rs:11
  11: panic_unwind::__rust_maybe_catch_panic
             at C:\projects\rust\src\libpanic_unwind\lib.rs:99
  12: std::rt::lang_start
             at C:\projects\rust\src\libstd\rt.rs:52
  13: main
  14: __scrt_common_main_seh
             at f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:253
  15: BaseThreadInitThunk
error: process didn't exit successfully: `target\debug\examples\window.exe` (exit code: 101)
@tomaka tomaka added the A-win32 label Nov 7, 2017
@tomaka
Copy link
Contributor

tomaka commented Nov 7, 2017

virtual desktop

That may be normal that OpenGL doesn't work on a virtual desktop, although there's no way for me to be sure.

@goddessfreya
Copy link
Contributor

goddessfreya commented Feb 25, 2019

I've experienced similar issues in VMs and really old computers. Usually, they just don't support a new enough opengl - or any real graphics functionality at all. By this I don't just mean OpenGL version, but also things like a lot of the pixel formats.

To quote @tomaka (#913 (comment)):

Glutin queries the system for the configuration you request (multisampling, sRGB, depth buffer size, etc.) and if the system doesn't support this configuration, then NoAvailablePixelFormat is returned.

Could you please submit some info about the graphics capabilities of this VM, and reopen this issue?
Windows: https://support.esri.com/en/technical-article/000011375
Linux: Just run glxinfo && glinfo && lspci

@hh9527
Copy link
Author

hh9527 commented Apr 10, 2019

This is my gl-report.txt

Renderer: GDI Generic
Vendor: Microsoft Corporation
Memory: 0 MB
Version: 1.1.0
Shading language version: N/A


Max texture size: 1024 x 1024
Max texture coordinates: 0
Max vertex texture image units: 0
Max texture image units: 0
Max geometry texture units: 0
Max anisotropic filtering value: 0
Max number of light sources: 8
Max viewport size: 16384 x 16384
Max uniform vertex components: 0
Max uniform fragment components: 0
Max geometry uniform components: 0
Max varying vectors: 0
Max samples: 0
Max draw buffers: 0


GL Extensions: 3
\i0 

GL_WIN_swap_hint
GL_EXT_paletted_texture
GL_EXT_bgra

Core features
v1.1 (100 % - 7/7)
v1.2 (12 % - 1/8)
v1.3 (0 % - 0/9)
v1.4 (0 % - 0/15)
v1.5 (0 % - 0/3)
v2.0 (0 % - 0/10)
v2.1 (0 % - 0/3)
v3.0 (0 % - 0/23)
v3.1 (0 % - 0/8)
v3.2 (0 % - 0/10)
v3.3 (0 % - 0/10)
v4.0 (0 % - 0/14)
v4.1 (0 % - 0/7)
v4.2 (0 % - 0/13)
v4.3 (0 % - 0/23)
v4.4 (0 % - 0/10)
v4.5 (0 % - 0/11)
v4.6 (0 % - 0/11)
vARB 2015 (0 % - 0/12)
OpenGL driver version check (Current: 0, Latest known: ):
 Latest version of display drivers found 
 According the database, you are running the latest display drivers for your video card.
 No multitexturing support 
 This may cause performance loss in some applications.
 No secondary color support 
 Some applications may not render polygon highlights correctly.
 No S3TC compression support 
 This may cause performance loss in some applications.
 No texture edge clamp support 
 This feature adds clamping control to edge texel filtering. Some programs may not render textures correctly (black line on borders.)
 No vertex program support 
 This feature enables vertex programming (equivalent to DX8 Vertex Shader.) Some current or future OpenGL programs may require this feature.
 No fragment program support 
 This feature enables per pixel programming (equivalent to DX9 Pixel Shader.) Some current or future OpenGL programs may require this feature.
 No OpenGL Shading Language support 
 This may break compatibility for applications using per pixel shading.
 No Frame buffer object support 
 This may break compatibility for applications using render to texture functions.
 Few texture units found 
 This may slow down some applications using fragment programs or extensive texture mapping.
Extension verification: 
 GL_EXT_color_subtable  was not found, but has the entry point  glColorSubTableEXT  

@goddessfreya
Copy link
Contributor

Your VM only supports OpenGl 1.1. Even if glutin didn't fail while trying to create a context, there's not much you could do.

@goddessfreya
Copy link
Contributor

I recommend you look into your VM's docs to attempt to achieve at minimum OpenGL 2.1 support.

@hh9527
Copy link
Author

hh9527 commented Apr 10, 2019

well, it is too old. But chrome/firfox work perfect in this machine, Does not their render engine require higher version of opengl?

@goddessfreya
Copy link
Contributor

Your VM might have better DirectX support, or something like that. Even if that's not the case, both browsers have numerous back ends for rendering, at least one of which is going to be non-hardware accelerated (a.k.a. all CPU side).

You might wish to inquire with those working on firefox for more details about the architecture of firefox, and how exactly they support older hardware.

@Oddity
Copy link

Oddity commented Dec 11, 2019

Could you please submit some info about the graphics capabilities of this VM, and reopen this issue?
Windows: https://support.esri.com/en/technical-article/000011375
Linux: Just run glxinfo && glinfo && lspci

I've run the GL extensions viewer. Don't see an option to export a .txt report anywhere so I'll have to post screenshots. But my rig definitely supports at least OpenGL 3.3 and I have no problem getting an OpenGL 3.3+ context in other programming languages / libraries, etc. (just nothing I've tried in Rust so far)

https://i.imgur.com/eatxF8o.png
https://i.imgur.com/ToI0bDx.png

As you can see in the screenshots, my card/drivers support up to OpenGL 4.4. My computer is definitely getting "old" by gaming rig standards, but I can't see any reason why glutin can't give me any pixel format at all.

@goddessfreya
Copy link
Contributor

@Oddity Can you please open a new issue? This one is about working with a VM that only supports opengl 1.1, which is obviously not your case :D

Can you take a look at this new and improved document I just typed up: https://github.com/rust-windowing/glutin/blob/92a3ad375555cbcf6a0fc20d8aaa782bcb3b6656/ISSUES.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants