Comments (3)
@tomaka
I've added fullscreen support for X11 (see my branch x11_fullscreen).
A few issues are still remaining (that's why I didn't do a PR):
- When exiting fullscreen mode, the screen doesn't switch back to its native resolution
- To access the monitor, we need to have access to the display, which means that it can't be used with WindowBuilder, as it is currently with Windows. Thus, refactoring needs to be done on that part, but I don't have access to a windows machine at the moment, and maybe you already have an idea about how to do it properly. I've currently put some dummy values so that we can use the fullscreen.rs example.
You can also go through my code and give me any feedback, as this is the first code I write in rust.
from glutin.
Nice!
My initial plan was that MonitorID was some kind of "system ID" which doesn't change even if you close and restart the program (it can be an integer, a string, etc. but not a pointer).
When you call get_available_monitors
or get_primary_monitor
, a display is created, the monitors are retreived, and the display is closed.
Then when you create the window, the display is reopened, and fail!
is called if the MonitorID
can't be found in the new display.
However I don't know if that's good practice. An alternative would be to use a static storage for the Display, like glfw does.
Also, why add is_fullscreen
to the WindowBuilder instead of just calling monitor.is_some()
?
from glutin.
Ok,
I could try to implement the first solution (create display, close it, and reopen it) and see how things go.
For is_fullscreen
, I'll use monitor.is_some()
instead.
I won't be able to work on it before two weeks though, as I'm on holidays.
from glutin.
Related Issues (20)
- WGL Current context is no longer current after calling Display::new(...) HOT 3
- Initializing specific OpenGL version (2.1) HOT 12
- badmatch on create_window_surface HOT 1
- Unable to create debug context with EGL when `KHR_create_context_no_error` is supported HOT 2
- Cannot create CGL context HOT 9
- Unable to load native library for native activity on Android 5.1 HOT 2
- Context priority
- Unable to Force GLES2 Context (Still picks up the wrong GLES version) HOT 5
- glutin-winit: `DisplayBuilder`'s `build` method fails on NixOS HOT 5
- Linking glutin statically against musl fails due to libloading HOT 3
- sRGB findings on various platforms HOT 5
- Design considerations for HDR colorspace support HOT 3
- Macos software renderer wrong `depth_size` reported? HOT 8
- Support raw_window_handle version 0.6 HOT 6
- Windows OpenGL context creation only loads version 1.1 HOT 11
- Add a variable to set opengl.dll filename on WGL HOT 3
- Unable to create a OpenGL 2.1 context on macOS HOT 2
- Support `winit` v0.30 HOT 4
- Enabling v-sync doesn't work on X11 but works on Wayland HOT 3
- Return type of config picker for glutin_winit::DisplayBuilder::build HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from glutin.