Skip to content

Commit

Permalink
delete rwh05 tests
Browse files Browse the repository at this point in the history
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
  • Loading branch information
sagudev committed Nov 23, 2024
1 parent 9e873ba commit a119f0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
7 changes: 3 additions & 4 deletions examples/chaos_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use winit::dpi::PhysicalSize;
use winit::event::WindowEvent::KeyboardInput;
use winit::event::{DeviceEvent, Event, WindowEvent};
use winit::event_loop::{ControlFlow, EventLoop};
use winit::raw_window_handle::HasWindowHandle;
use winit::raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle, HasWindowHandle};
use winit::window::WindowBuilder;

#[cfg(target_os = "macos")]
Expand All @@ -30,14 +30,13 @@ static TRIANGLE_POINTS: [(f32, f32); 3] = [
(400.0 - 259.81, 300.0 + 75.0 - 300.0),
];

#[cfg(not(all(target_os = "macos", feature = "sm-raw-window-handle-05")))]
#[cfg(not(all(target_os = "macos", feature = "sm-raw-window-handle-06")))]
fn main() {
println!("The `chaos_game` demo is not yet supported on this platform.");
}

#[cfg(all(target_os = "macos", feature = "sm-raw-window-handle-05"))]
#[cfg(all(target_os = "macos", feature = "sm-raw-window-handle-06"))]
fn main() {
use rwh_05::{HasRawDisplayHandle, HasRawWindowHandle};
let connection = SystemConnection::new().unwrap();
let adapter = connection.create_adapter().unwrap();
let mut device = connection.create_device(&adapter).unwrap();
Expand Down
30 changes: 1 addition & 29 deletions examples/threads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
//
// This example demonstrates how to create a multithreaded OpenGL application using `surfman`.

#![cfg(any(
feature = "sm-raw-window-handle-05",
feature = "sm-raw-window-handle-06"
))]
#![cfg(feature = "sm-raw-window-handle-06")]

use self::common::{ck, Buffer, Program, ResourceLoader, Shader, ShaderKind};

Expand All @@ -29,9 +26,6 @@ use winit::{
window::WindowBuilder,
};

#[cfg(feature = "sm-raw-window-handle-05")]
use rwh_05::{HasRawDisplayHandle, HasRawWindowHandle};
#[cfg(not(feature = "sm-raw-window-handle-05"))]
use rwh_06::{HasDisplayHandle, HasWindowHandle};

pub mod common;
Expand Down Expand Up @@ -95,14 +89,6 @@ static BACKGROUND_COLOR: [f32; 4] = [
1.0,
];

#[cfg(feature = "sm-raw-window-handle-05")]
fn make_connection(window: &winit::window::Window) -> surfman::Connection {
let raw_display_handle = window.raw_display_handle();
let connection = Connection::from_raw_display_handle(raw_display_handle).unwrap();
connection
}

#[cfg(not(feature = "sm-raw-window-handle-05"))]
fn make_connection(window: &winit::window::Window) -> surfman::Connection {
let display_handle = window
.display_handle()
Expand All @@ -111,20 +97,6 @@ fn make_connection(window: &winit::window::Window) -> surfman::Connection {
connection
}

#[cfg(feature = "sm-raw-window-handle-05")]
fn make_native_widget(
window: &winit::window::Window,
connection: &surfman::Connection,
window_size: Size2D<i32>,
) -> surfman::NativeWidget {
let raw_window_handle = window.raw_window_handle();
let native_widget = connection
.create_native_widget_from_raw_window_handle(raw_window_handle, window_size)
.unwrap();
native_widget
}

#[cfg(not(feature = "sm-raw-window-handle-05"))]
fn make_native_widget(
window: &winit::window::Window,
connection: &surfman::Connection,
Expand Down

0 comments on commit a119f0a

Please sign in to comment.