Skip to content

Commit 43dac28

Browse files
committed
Remove headless support
1 parent 1842c04 commit 43dac28

File tree

10 files changed

+2
-293
lines changed

10 files changed

+2
-293
lines changed

.github/workflows/rust.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,3 @@ jobs:
8181
echo "::endgroup::"
8282
fi
8383
done
84-
85-
# headless:
86-
# runs-on: ubuntu-latest
87-
# steps:
88-
# - uses: actions/checkout@v2
89-
90-
# - name: Install Rust Toolchain
91-
# uses: actions-rs/toolchain@v1
92-
# with:
93-
# profile: minimal
94-
# toolchain: stable
95-
# override: true
96-
97-
# - run: sudo apt-get update && sudo apt-get install -y xvfb libfontconfig1-dev
98-
99-
# - run: xvfb-run -a cargo run --example headless --features="headless"

Cargo.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ targets = ["x86_64-apple-darwin", "x86_64-unknown-linux-gnu", "x86_64-pc-windows
1919
[features]
2020
default = ["window"]
2121
window = ["glutin", "winit", "raw-window-handle", "wasm-bindgen", "serde", "serde-wasm-bindgen", "web-sys"] # Window module
22-
headless = ["glutin_029"] # Headless rendering
2322
egui-gui = ["egui_glow", "egui", "getrandom"] # Additional GUI features
2423
text = ["swash", "lyon"] # Text mesh generation features
2524

@@ -38,7 +37,6 @@ lyon = { version = "1", optional = true }
3837

3938
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
4039
glutin = { version = "0.30", optional = true }
41-
glutin_029 = { package = "glutin", version = "0.29", optional = true }
4240
raw-window-handle = { version = "0.5", optional = true }
4341
image = { version = "0.25", default-features = false, features = ["png"], optional = true }
4442

@@ -191,11 +189,6 @@ path = "examples/winit_window/src/main.rs"
191189
name = "multiwindow"
192190
path = "examples/multiwindow/src/main.rs"
193191

194-
[[example]]
195-
name = "headless"
196-
path = "examples/headless/src/main.rs"
197-
required-features = ["headless"]
198-
199192
[[example]]
200193
name = "logo"
201194
path = "examples/logo/src/main.rs"

examples/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,3 @@ Shows how to easily combine a custom [winit](https://crates.io/crates/winit) win
151151
## Multiwindow [[code](https://github.com/asny/three-d/tree/master/examples/multiwindow/src/main.rs)] [[demo](https://asny.github.io/three-d/0.19/multiwindow.html)]
152152

153153
Shows how to create multiple [winit](https://crates.io/crates/winit) windows and render with `three-d`.
154-
155-
## Headless [[code](https://github.com/asny/three-d/tree/master/examples/headless/src/main.rs)]
156-
157-
This example does not create a window but render directly to a render target and saves the result to disk. Therefore, this example does not work on web.

examples/headless/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

examples/headless/src/lib.rs

Lines changed: 0 additions & 17 deletions
This file was deleted.

examples/headless/src/main.rs

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/window.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//!
22
//! Window, event handling and context creation for easy setup.
33
//! * Can be avoided fully by setting up a window, event handling etc. and creating a [Context](crate::core::Context) from a [glow](https://crates.io/crates/glow) OpenGL/WebGL context.
4-
//! * If full control over the window and event handling, but not the context creation, is desired, use a [WindowedContext] or [HeadlessContext].
4+
//! * If full control over the window and event handling, but not the context creation, is desired, use a [WindowedContext].
55
//! * Finally, for an easy setup, use [Window::new] or [Window::from_winit_window], the latter will provide full control over the creation of the window.
66
//!
77
//!
@@ -11,9 +11,3 @@
1111
mod winit_window;
1212
#[cfg(feature = "window")]
1313
pub use winit_window::*;
14-
15-
#[cfg(all(feature = "headless", not(target_arch = "wasm32")))]
16-
#[cfg_attr(docsrs, doc(feature = "headless"))]
17-
mod headless;
18-
#[cfg(all(feature = "headless", not(target_arch = "wasm32")))]
19-
pub use headless::*;

src/window/headless.rs

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/window/winit_window.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl Window {
177177
///
178178
/// Creates a new window from a [winit](https://crates.io/crates/winit) window and event loop with the given surface settings, giving the user full
179179
/// control over the creation of the window.
180-
/// This method takes ownership of the winit window and event loop, if this is not desired, use a [WindowedContext] or [HeadlessContext](crate::HeadlessContext) instead.
180+
/// This method takes ownership of the winit window and event loop, if this is not desired, use a [WindowedContext] instead.
181181
///
182182
pub fn from_winit_window(
183183
winit_window: window::Window,

src/window/winit_window/windowed_context.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ mod inner {
9595
use super::*;
9696
///
9797
/// A windowed graphics context, ie. a graphics context that is associated with a window.
98-
/// For a graphics context that is not associated with a window, see [HeadlessContext](crate::HeadlessContext).
9998
///
10099
pub struct WindowedContext {
101100
pub(super) context: Context,

0 commit comments

Comments
 (0)