Commit Graph

84 Commits

Author SHA1 Message Date
Victor Brekenfeld 9300e35093 lint: fmt 2020-04-30 19:03:02 +02:00
Victor Brekenfeld 31b6d84442 WIP: Rework egl and glium errors 2020-04-30 00:24:35 +02:00
Victor Brekenfeld cde06eb99a cursor: simplify trait by removing barely utilized lifetimes 2020-04-21 20:18:34 +02:00
Chandler Newman 3c6877f094 Fix formatting 2020-04-15 12:24:31 +01:00
Chandler Newman b8df85e744 Mark get_proc_address as safe 2020-04-15 12:16:02 +01:00
Chandler Newman a684f5d8d6 Refactor EGL backend 2020-04-15 12:01:01 +01:00
Victor Berger b54d95c15d
Fix most clippy warnings (#185)
* Add missing documentation

* Fix most clippy warnings
2020-04-15 09:28:22 +02:00
nycex 0140de89fb fix some clippy warnings (#147)
This commit removes some clippy warnings (to advance #45) by doing the following:
- replace usage of `mem::uninitialized()` with `MaybeUninit`
- replace usage of `nix::libc::{uint64_t, int32_t}` with `{u64, i32}`
- replace functions inside of `Option::ok_or` with `Option::ok_or_else`
- replace functions inside of `Result::unwrap_or` with `Result::unwrap_or_else`
- replace occurrences of pass-by-reference with pass-by-value when
  appropriate
- replace unused variables in pattern-matching with wildcards
- replace `match` expressions that have only one case with `if let`
  expressions
- replace UpperCamelCase names of consts with SCREAMING_SNAKE_CASE
- remove `clone()` on types that implement Copy
- remove redundant imports
- remove `fn main()` from doctests
- remove let binding for variables that are returned afterwards
2020-01-01 11:43:16 +01:00
Victor Brekenfeld e5f8c351c7 Check for rust_2018_idioms 2018-12-16 19:31:38 +01:00
Victor Brekenfeld 71bd64a6bf Fix source code for 2018 edition 2018-12-16 19:31:38 +01:00
Victor Brekenfeld 04aee7cbc9 Replace documentation links with intra rustdoc links 2018-12-13 15:14:25 +01:00
Victor Brekenfeld a1b8d2bf47 docs: clarify get_framebuffer_dimensions 2018-12-08 17:26:05 +01:00
Victor Berger 7dc3d64b6e docs: typo fixes
Co-Authored-By: Drakulix <github@drakulix.de>
2018-12-08 13:47:22 +01:00
Victor Brekenfeld bbe767002d comments: add more explainations to new code 2018-12-05 22:48:10 +01:00
Victor Brekenfeld 36b265400a docs: add graphics/gl 2018-12-05 22:45:01 +01:00
Victor Brekenfeld 8abcc145d7 egl: EGLContext borrow native to circumvent RefCell runtime error 2018-12-02 22:01:45 +01:00
Victor Brekenfeld 9a82de6fae graphics: Move PixelFormat out of gl module 2018-11-29 19:41:17 +01:00
Victor Brekenfeld 9ee44672a0 cargo fmt 2018-11-29 16:13:07 +01:00
Victor Brekenfeld 38ec44f70c Hide SoftwareRenderer behind feature flag
- Don't let backend depend on `CursorBackend` (used to be `GraphicsBackend`) anymore
2018-11-29 16:12:11 +01:00
Victor Brekenfeld ccc7abc94f Create general SwapBuffersError 2018-11-29 16:12:11 +01:00
Victor Brekenfeld bbf28655d1 Rename GraphicsBackend to CursorBackend 2018-11-29 16:12:11 +01:00
Victor Brekenfeld ac0dc42e9e Add seperate GL module
- Move parts of glium & egl module into own module
- Add raw GL loader as an alternative
2018-11-29 16:12:11 +01:00
Victor Brekenfeld c9e67cdfef Move egl module
- Remove gbm code
- rename EGLWaylandExtensions to EGLGraphicsBackend
- remove OpenGL specific code where possible
2018-11-29 16:12:11 +01:00
Colin Benner 734d2ce996 Fmt, spelling and capitalisation fixes (#113)
* Rename priviledged to privileged in backend/drm/mod.rs

* Fix a number of typos in comments

* Fix typos in string literals

* Wrap identifiers with backticks in doc comments

* Spelling and capitalisation in doc comments

* Use XWayland in comments

This seems to be the standard capitalisation, even though the executable
is called `Xwayland`.

* Use Glium instead of glium in comments

* Use DRM and API in comments

* Fix remaining occurrence of 'priviledged'

* Reformat code to appease Travis' rustfmt
2018-10-30 13:56:30 +01:00
Jonas Platte a77e29d9b5 lib: Use nested imports 2018-10-07 22:39:18 +02:00
Lucas Timmins ffdf245259 Upgrade winit backend to 0.17 2018-09-30 19:22:35 +08:00
Victor Berger 454f874284 cargo fmt 2018-09-25 00:32:09 +02:00
Colin Benner 6d31e9e5ff address more clippy warnings
Not sure how much of an improvement these are.
2018-06-29 12:30:42 +02:00
Victor Berger 89764bf442 wayland.backend.egl: derive Debug for Format 2018-05-19 19:48:13 +02:00
Victor Berger 7f6af94733 backend: migrate drm & udev 2018-04-18 09:38:35 +02:00
Victor Berger f9dbabce56 backend.graphics: port no-feature code to wayland-rs 0.20 2018-04-17 19:17:11 +02:00
Drakulix c36c511c53 [glium] Remove unnecessary mutable self reference for borrowing 2018-03-29 15:31:25 +02:00
Drakulix bdb653042c Update glium integration to allow mutable borrowing 2018-03-09 11:50:01 +01:00
Drakulix 8a30689015 Add getter for current `DrmBackend` mode 2018-02-18 22:04:13 +01:00
Drakulix 32f48b3cd2 Fix some clippy lints 2018-01-09 14:12:31 +01:00
Drakulix 66c011c942 Use new rustfmt-preview 2018-01-07 22:30:38 +01:00
Drakulix aaa68b1cce Add documentation for the egl buffer features 2018-01-07 22:12:14 +01:00
Drakulix efaadb8882 Fix a bunch of warnings 2018-01-07 20:24:40 +01:00
Drakulix c5f475ebb5 Make unbind_egl_display into Drop implementation for EGLDisplay 2018-01-07 13:02:26 +01:00
Drakulix a527456ba6 Fixup drm backends for egl hardware-acceleration
- Decouple DrmBackend and DrmDevice through Weak references
- Move EGL-WlBuffer related functionality into it's own trait
- Impl new trait by every struct that can theoretically bind the display although it is no rendering target (no EGLGraphicsBackend), e.g. DrmDevice
- Move texture binding into own struct `EGLDisplay` created by `bind_wl_display` that can be passed around freely
- Add device num to DrmDevice for HashMap storage
- Fixup and enable acceleration on drm and udev examples made possible by the previous changes.
2018-01-05 20:04:46 +01:00
Drakulix 6c6d54064d Get it to work... 2017-12-28 15:30:53 +01:00
Drakulix 726991367d Rework egl image api 2017-12-27 12:20:16 +01:00
Drakulix 5d7e96103d Rework EGL module 2017-12-24 14:29:45 +01:00
Drakulix 5c846d550c Start EGL wl_buffer image retrieval 2017-12-24 14:12:51 +01:00
Drakulix 14fc36bf54 Add binding/unbinding wayland display on EGLContext 2017-12-24 14:12:51 +01:00
Drakulix a9d30374dc Add EGL_WL_bind_wayland_display bindings 2017-12-24 14:12:51 +01:00
Drakulix e1b2c88c83 Use global gl_generator generator 2017-12-24 14:12:51 +01:00
Drakulix 4207611e6d rustfmt code 2017-12-15 19:22:44 +01:00
Drakulix 96bb3570ba Get input working 2017-11-29 22:28:14 +01:00
Drakulix c7682e77de Udev backend 2017-11-29 22:28:13 +01:00