From 2b4d8a7b2653f51ae83009257c4ec1dc4201d5ff Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 17 Mar 2022 00:41:43 -0300 Subject: Implement `GraphicsInformation` for `iced_glow` --- graphics/src/window/gl_compositor.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'graphics/src/window/gl_compositor.rs') diff --git a/graphics/src/window/gl_compositor.rs b/graphics/src/window/gl_compositor.rs index b1b995f1..23c6d3f8 100644 --- a/graphics/src/window/gl_compositor.rs +++ b/graphics/src/window/gl_compositor.rs @@ -1,3 +1,4 @@ +use crate::window::GraphicsInformation; use crate::{Color, Error, Size, Viewport}; use core::ffi::c_void; @@ -48,6 +49,9 @@ pub trait GLCompositor: Sized { /// Resizes the viewport of the [`GLCompositor`]. fn resize_viewport(&mut self, physical_size: Size); + /// Returns [`GraphicsInformation`] used by this [`Compositor`]. + fn get_information(&self) -> GraphicsInformation; + /// Presents the primitives of the [`Renderer`] to the next frame of the /// [`GLCompositor`]. /// -- cgit From 5be1ac18fe1757d31386f98774d823bd1137eea4 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 26 Apr 2022 19:09:09 -0300 Subject: Rename `GraphicsInformation` to `Information` --- graphics/src/window/gl_compositor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'graphics/src/window/gl_compositor.rs') diff --git a/graphics/src/window/gl_compositor.rs b/graphics/src/window/gl_compositor.rs index 23c6d3f8..65761fe8 100644 --- a/graphics/src/window/gl_compositor.rs +++ b/graphics/src/window/gl_compositor.rs @@ -1,4 +1,4 @@ -use crate::window::GraphicsInformation; +use crate::window::Information; use crate::{Color, Error, Size, Viewport}; use core::ffi::c_void; @@ -50,7 +50,7 @@ pub trait GLCompositor: Sized { fn resize_viewport(&mut self, physical_size: Size); /// Returns [`GraphicsInformation`] used by this [`Compositor`]. - fn get_information(&self) -> GraphicsInformation; + fn get_information(&self) -> Information; /// Presents the primitives of the [`Renderer`] to the next frame of the /// [`GLCompositor`]. -- cgit From 984d1f375ecec301dd42b049eecd1b88e3bca32a Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 26 Apr 2022 19:18:18 -0300 Subject: Move `compositor` module access from `window` to `crate` --- graphics/src/window/gl_compositor.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'graphics/src/window/gl_compositor.rs') diff --git a/graphics/src/window/gl_compositor.rs b/graphics/src/window/gl_compositor.rs index 65761fe8..3adde8e6 100644 --- a/graphics/src/window/gl_compositor.rs +++ b/graphics/src/window/gl_compositor.rs @@ -1,4 +1,6 @@ -use crate::window::Information; +//! A compositor is responsible for initializing a renderer and managing window +//! surfaces. +use crate::compositor::Information; use crate::{Color, Error, Size, Viewport}; use core::ffi::c_void; -- cgit From 005e516b5e1e8bb22f2da8524ffe4529f3b60ba1 Mon Sep 17 00:00:00 2001 From: Richard Date: Tue, 26 Apr 2022 19:20:38 -0300 Subject: Rename `get_information` to `fetch_information` --- graphics/src/window/gl_compositor.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'graphics/src/window/gl_compositor.rs') diff --git a/graphics/src/window/gl_compositor.rs b/graphics/src/window/gl_compositor.rs index 3adde8e6..4ff17366 100644 --- a/graphics/src/window/gl_compositor.rs +++ b/graphics/src/window/gl_compositor.rs @@ -52,7 +52,7 @@ pub trait GLCompositor: Sized { fn resize_viewport(&mut self, physical_size: Size); /// Returns [`GraphicsInformation`] used by this [`Compositor`]. - fn get_information(&self) -> Information; + fn fetch_information(&self) -> Information; /// Presents the primitives of the [`Renderer`] to the next frame of the /// [`GLCompositor`]. -- cgit