From f6eb86eb0f4ac6c1e8ce17b1756e2b618c28a21a Mon Sep 17 00:00:00 2001 From: hugohil Date: Mon, 24 Aug 2026 18:44:11 +0200 Subject: [PATCH] Update Rust examples Rust examples now matches new Glfw and create_surface API --- examples/animated_mesh.rs | 4 ++-- examples/background_image.rs | 4 ++-- examples/blend_modes.rs | 4 ++-- examples/box.rs | 4 ++-- examples/camera_controllers.rs | 4 ++-- examples/curves.rs | 4 ++-- examples/custom_attribute.rs | 4 ++-- examples/custom_material.rs | 4 ++-- examples/filter.rs | 4 ++-- examples/gltf_load.rs | 4 ++-- examples/input.rs | 4 ++-- examples/lights.rs | 4 ++-- examples/materials.rs | 4 ++-- examples/midi.rs | 4 ++-- examples/particles_animated.rs | 4 ++-- examples/particles_basic.rs | 4 ++-- examples/particles_colored.rs | 4 ++-- examples/particles_colored_pbr.rs | 4 ++-- examples/particles_emit.rs | 4 ++-- examples/particles_emit_gpu.rs | 4 ++-- examples/particles_from_mesh.rs | 4 ++-- examples/particles_lifecycle.rs | 4 ++-- examples/particles_noise.rs | 4 ++-- examples/particles_oriented.rs | 4 ++-- examples/particles_scatter.rs | 4 ++-- examples/particles_scatter_volume.rs | 4 ++-- examples/particles_stress.rs | 4 ++-- examples/particles_text_whirl.rs | 4 ++-- examples/pbr.rs | 4 ++-- examples/primitives_2d.rs | 4 ++-- examples/primitives_3d.rs | 4 ++-- examples/rectangle.rs | 4 ++-- examples/shapes.rs | 4 ++-- examples/stroke_2d.rs | 4 ++-- examples/stroke_3d.rs | 4 ++-- examples/text.rs | 4 ++-- examples/text_3d.rs | 4 ++-- examples/transforms.rs | 4 ++-- examples/update_pixels.rs | 4 ++-- examples/webcam.rs | 4 ++-- 40 files changed, 80 insertions(+), 80 deletions(-) diff --git a/examples/animated_mesh.rs b/examples/animated_mesh.rs index dd85212c..cefb166d 100644 --- a/examples/animated_mesh.rs +++ b/examples/animated_mesh.rs @@ -19,12 +19,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 600)?; + let mut glfw_ctx = GlfwContext::new(600, 600, false)?; init(Config::default())?; let width = 600; let height = 600; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let grid_size = 20; diff --git a/examples/background_image.rs b/examples/background_image.rs index dfc0d319..18c1f1b0 100644 --- a/examples/background_image.rs +++ b/examples/background_image.rs @@ -17,12 +17,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; let width = 400; let height = 400; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let image = image_load("images/logo.png")?; diff --git a/examples/blend_modes.rs b/examples/blend_modes.rs index 3cfa4677..e23cb810 100644 --- a/examples/blend_modes.rs +++ b/examples/blend_modes.rs @@ -28,10 +28,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 500; let height = 500; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let mut index: usize = 0; diff --git a/examples/box.rs b/examples/box.rs index c75efc5b..a4c7f4ac 100644 --- a/examples/box.rs +++ b/examples/box.rs @@ -18,12 +18,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; let width = 400; let height = 400; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let box_geo = geometry_box(100.0, 100.0, 100.0)?; diff --git a/examples/camera_controllers.rs b/examples/camera_controllers.rs index 18b08501..187ceef7 100644 --- a/examples/camera_controllers.rs +++ b/examples/camera_controllers.rs @@ -20,10 +20,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 800; let height = 600; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let box_geo = geometry_box(100.0, 100.0, 100.0)?; diff --git a/examples/curves.rs b/examples/curves.rs index 95c21feb..b15ccdff 100644 --- a/examples/curves.rs +++ b/examples/curves.rs @@ -9,10 +9,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(800, 400)?; + let mut glfw_ctx = GlfwContext::new(800, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(800, 400)?; + let surface = glfw_ctx.create_surface(800, 400, false)?; let graphics = graphics_create(surface, 800, 400, TextureFormat::Rgba16Float)?; let mut t: f32 = 0.0; diff --git a/examples/custom_attribute.rs b/examples/custom_attribute.rs index a223ad98..78dfc0d0 100644 --- a/examples/custom_attribute.rs +++ b/examples/custom_attribute.rs @@ -19,12 +19,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 600)?; + let mut glfw_ctx = GlfwContext::new(600, 600, false)?; init(Config::default())?; let width = 600; let height = 600; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let custom_attr = geometry_attribute_create("Custom", AttributeFormat::Float)?; diff --git a/examples/custom_material.rs b/examples/custom_material.rs index 7abbe631..8af6ca23 100644 --- a/examples/custom_material.rs +++ b/examples/custom_material.rs @@ -20,10 +20,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 400; let height = 400; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let box_geo = geometry_box(100.0, 100.0, 100.0)?; diff --git a/examples/filter.rs b/examples/filter.rs index f0b770d8..6dc2fc87 100644 --- a/examples/filter.rs +++ b/examples/filter.rs @@ -19,10 +19,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(400, 400)?; + let surface = glfw_ctx.create_surface(400, 400, false)?; let graphics = graphics_create(surface, 400, 400, TextureFormat::Rgba16Float)?; let palette = [ diff --git a/examples/gltf_load.rs b/examples/gltf_load.rs index 8d869588..af9d38c5 100644 --- a/examples/gltf_load.rs +++ b/examples/gltf_load.rs @@ -21,10 +21,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 800; let height = 600; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let gltf = gltf_load(graphics, "gltf/Duck.glb")?; diff --git a/examples/input.rs b/examples/input.rs index e3412e36..fd335ac7 100644 --- a/examples/input.rs +++ b/examples/input.rs @@ -19,10 +19,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 400; let height = 400; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; while glfw_ctx.poll_events() { diff --git a/examples/lights.rs b/examples/lights.rs index 94a68777..224cbf86 100644 --- a/examples/lights.rs +++ b/examples/lights.rs @@ -18,12 +18,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; let width = 400; let height = 400; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let box_geo = geometry_box(100.0, 100.0, 100.0)?; let pbr_mat = material_create_pbr()?; diff --git a/examples/materials.rs b/examples/materials.rs index 9fb61aab..c3805133 100644 --- a/examples/materials.rs +++ b/examples/materials.rs @@ -20,10 +20,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 800; let height = 600; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let sphere = geometry_sphere(30.0, 32, 18)?; diff --git a/examples/midi.rs b/examples/midi.rs index 5128c928..9113ae35 100644 --- a/examples/midi.rs +++ b/examples/midi.rs @@ -44,10 +44,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(WIDTH, HEIGHT)?; + let mut glfw_ctx = GlfwContext::new(WIDTH, HEIGHT, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(WIDTH, HEIGHT)?; + let surface = glfw_ctx.create_surface(WIDTH, HEIGHT, false)?; let graphics = graphics_create(surface, WIDTH, HEIGHT, TextureFormat::Rgba16Float)?; midi_refresh_ports()?; diff --git a/examples/particles_animated.rs b/examples/particles_animated.rs index 1a07422c..9489a526 100644 --- a/examples/particles_animated.rs +++ b/examples/particles_animated.rs @@ -34,10 +34,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_basic.rs b/examples/particles_basic.rs index baaafc44..b3176d4d 100644 --- a/examples/particles_basic.rs +++ b/examples/particles_basic.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_colored.rs b/examples/particles_colored.rs index 06132978..4d176a83 100644 --- a/examples/particles_colored.rs +++ b/examples/particles_colored.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_colored_pbr.rs b/examples/particles_colored_pbr.rs index 58b4e68c..9d7bd8b2 100644 --- a/examples/particles_colored_pbr.rs +++ b/examples/particles_colored_pbr.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_emit.rs b/examples/particles_emit.rs index 3ab58099..aafe40cf 100644 --- a/examples/particles_emit.rs +++ b/examples/particles_emit.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_emit_gpu.rs b/examples/particles_emit_gpu.rs index 3f0fc501..ff52502c 100644 --- a/examples/particles_emit_gpu.rs +++ b/examples/particles_emit_gpu.rs @@ -120,10 +120,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_from_mesh.rs b/examples/particles_from_mesh.rs index d4190c39..baf4f272 100644 --- a/examples/particles_from_mesh.rs +++ b/examples/particles_from_mesh.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_lifecycle.rs b/examples/particles_lifecycle.rs index cb4d0371..ba5ee6bb 100644 --- a/examples/particles_lifecycle.rs +++ b/examples/particles_lifecycle.rs @@ -47,10 +47,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_noise.rs b/examples/particles_noise.rs index 2ed4bbd3..8415ce51 100644 --- a/examples/particles_noise.rs +++ b/examples/particles_noise.rs @@ -11,10 +11,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_oriented.rs b/examples/particles_oriented.rs index 4dcf443d..b7634c9d 100644 --- a/examples/particles_oriented.rs +++ b/examples/particles_oriented.rs @@ -45,10 +45,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_scatter.rs b/examples/particles_scatter.rs index 36dd715d..0a4ecb03 100644 --- a/examples/particles_scatter.rs +++ b/examples/particles_scatter.rs @@ -40,10 +40,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_scatter_volume.rs b/examples/particles_scatter_volume.rs index 9b0f7b68..a4f0cb82 100644 --- a/examples/particles_scatter_volume.rs +++ b/examples/particles_scatter_volume.rs @@ -40,10 +40,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 400)?; + let mut glfw_ctx = GlfwContext::new(600, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_stress.rs b/examples/particles_stress.rs index 281f4382..2d5b20df 100644 --- a/examples/particles_stress.rs +++ b/examples/particles_stress.rs @@ -48,10 +48,10 @@ fn hash_unit(seed: u32) -> f32 { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 700)?; + let mut glfw_ctx = GlfwContext::new(900, 700, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 700)?; + let surface = glfw_ctx.create_surface(900, 700, false)?; let graphics = graphics_create(surface, 900, 700, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/particles_text_whirl.rs b/examples/particles_text_whirl.rs index b9b2a778..f3ed33e5 100644 --- a/examples/particles_text_whirl.rs +++ b/examples/particles_text_whirl.rs @@ -261,10 +261,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(1200, 800)?; + let mut glfw_ctx = GlfwContext::new(1200, 800, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(1200, 800)?; + let surface = glfw_ctx.create_surface(1200, 800, false)?; let graphics = graphics_create(surface, 1200, 800, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/pbr.rs b/examples/pbr.rs index 0751ad04..d02a1843 100644 --- a/examples/pbr.rs +++ b/examples/pbr.rs @@ -20,10 +20,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 800; let height = 600; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/primitives_2d.rs b/examples/primitives_2d.rs index 3d1001e1..a257777b 100644 --- a/examples/primitives_2d.rs +++ b/examples/primitives_2d.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 600)?; + let mut glfw_ctx = GlfwContext::new(600, 600, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(600, 600)?; + let surface = glfw_ctx.create_surface(600, 600, false)?; let graphics = graphics_create(surface, 600, 600, TextureFormat::Rgba16Float)?; let mut t: f32 = 0.0; diff --git a/examples/primitives_3d.rs b/examples/primitives_3d.rs index a93c8fd2..4838c7db 100644 --- a/examples/primitives_3d.rs +++ b/examples/primitives_3d.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(900, 400)?; + let mut glfw_ctx = GlfwContext::new(900, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(900, 400)?; + let surface = glfw_ctx.create_surface(900, 400, false)?; let graphics = graphics_create(surface, 900, 400, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/rectangle.rs b/examples/rectangle.rs index 7ea00936..1f75466c 100644 --- a/examples/rectangle.rs +++ b/examples/rectangle.rs @@ -17,12 +17,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; let width = 400; let height = 400; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; while glfw_ctx.poll_events() { diff --git a/examples/shapes.rs b/examples/shapes.rs index b46cb3a1..23820b68 100644 --- a/examples/shapes.rs +++ b/examples/shapes.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 600)?; + let mut glfw_ctx = GlfwContext::new(600, 600, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(600, 600)?; + let surface = glfw_ctx.create_surface(600, 600, false)?; let graphics = graphics_create(surface, 600, 600, TextureFormat::Rgba16Float)?; let mut t: f32 = 0.0; diff --git a/examples/stroke_2d.rs b/examples/stroke_2d.rs index d666e3f9..3eafdf54 100644 --- a/examples/stroke_2d.rs +++ b/examples/stroke_2d.rs @@ -9,10 +9,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 300)?; + let mut glfw_ctx = GlfwContext::new(600, 300, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(600, 300)?; + let surface = glfw_ctx.create_surface(600, 300, false)?; let graphics = graphics_create(surface, 600, 300, TextureFormat::Rgba16Float)?; let joins = [ diff --git a/examples/stroke_3d.rs b/examples/stroke_3d.rs index 93052dc5..5853686c 100644 --- a/examples/stroke_3d.rs +++ b/examples/stroke_3d.rs @@ -10,10 +10,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 400)?; + let mut glfw_ctx = GlfwContext::new(600, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(600, 400)?; + let surface = glfw_ctx.create_surface(600, 400, false)?; let graphics = graphics_create(surface, 600, 400, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/text.rs b/examples/text.rs index bd8e5167..956a56de 100644 --- a/examples/text.rs +++ b/examples/text.rs @@ -18,12 +18,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(600, 400)?; + let mut glfw_ctx = GlfwContext::new(600, 400, false)?; init(Config::default())?; let width = 600; let height = 400; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; while glfw_ctx.poll_events() { diff --git a/examples/text_3d.rs b/examples/text_3d.rs index 47d4d206..95f2fd64 100644 --- a/examples/text_3d.rs +++ b/examples/text_3d.rs @@ -12,10 +12,10 @@ fn main() { fn sketch() -> error::Result<()> { let width = 1200; let height = 700; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; graphics_mode_3d(graphics)?; diff --git a/examples/transforms.rs b/examples/transforms.rs index 0c8811e2..87fb34af 100644 --- a/examples/transforms.rs +++ b/examples/transforms.rs @@ -11,10 +11,10 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(400, 400)?; + let mut glfw_ctx = GlfwContext::new(400, 400, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(400, 400)?; + let surface = glfw_ctx.create_surface(400, 400, false)?; let graphics = graphics_create(surface, 400, 400, TextureFormat::Rgba16Float)?; let mut t: f32 = 0.0; diff --git a/examples/update_pixels.rs b/examples/update_pixels.rs index e2eb7284..9d8218d7 100644 --- a/examples/update_pixels.rs +++ b/examples/update_pixels.rs @@ -17,12 +17,12 @@ fn main() { } fn sketch() -> error::Result<()> { - let mut glfw_ctx = GlfwContext::new(100, 100)?; + let mut glfw_ctx = GlfwContext::new(100, 100, false)?; init(Config::default())?; let width = 100; let height = 100; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let rect_w = 10; diff --git a/examples/webcam.rs b/examples/webcam.rs index 211ba25f..d2609d75 100644 --- a/examples/webcam.rs +++ b/examples/webcam.rs @@ -21,10 +21,10 @@ fn sketch() -> error::Result<()> { let width = 640; let height = 480; - let mut glfw_ctx = GlfwContext::new(width, height)?; + let mut glfw_ctx = GlfwContext::new(width, height, false)?; init(Config::default())?; - let surface = glfw_ctx.create_surface(width, height)?; + let surface = glfw_ctx.create_surface(width, height, false)?; let graphics = graphics_create(surface, width, height, TextureFormat::Rgba16Float)?; let webcam = webcam_create()?;