From 35f62eccbe2c21c148b95812175d9a2c286e5ed8 Mon Sep 17 00:00:00 2001 From: Kirill Chibisov Date: Tue, 12 Nov 2024 20:17:17 +0300 Subject: [PATCH] docs: update --- glutin/src/context.rs | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/glutin/src/context.rs b/glutin/src/context.rs index 1abacbe33c..95d950a43d 100644 --- a/glutin/src/context.rs +++ b/glutin/src/context.rs @@ -49,9 +49,9 @@ pub trait NotCurrentGlContext: Sealed { /// guaranteed to be current. fn treat_as_possibly_current(self) -> Self::PossiblyCurrentContext; - /// Make [`Self::Surface`] current on the calling thread producing the - /// [`Self::PossiblyCurrentContext`] indicating that the context could - /// be current on the calling thread. + /// Make context current on the calling thread producing the + /// [`Self::PossiblyCurrentContext`]. The `surface` is used as a target for + /// default framebuffer. /// /// # Platform specific /// @@ -64,8 +64,8 @@ pub trait NotCurrentGlContext: Sealed { surface: &Self::Surface, ) -> Result; - /// The same as [`Self::make_current`], but provides a way to set read and - /// draw surfaces. + /// The same as [`Self::make_current`], but provides a way to set draw and + /// read surfaces. /// /// # Api specific /// @@ -77,13 +77,12 @@ pub trait NotCurrentGlContext: Sealed { ) -> Result; /// Make context current on the calling thread without a default - /// framebuffer producing the [`Self::PossiblyCurrentContext`] indicating - /// that the context could be current on the calling thread. + /// framebuffer producing the [`Self::PossiblyCurrentContext`]. /// /// # Api specific /// /// - **WGL/GLX:** requires OpenGL 3.0 or greater context and - /// ARB_create_context extensions. + /// `ARB_create_context` extensions. fn make_current_surfaceless(self) -> Result; } @@ -99,28 +98,28 @@ pub trait PossiblyCurrentGlContext: Sealed { fn is_current(&self) -> bool; /// Make the context not current to the current thread and returns a - /// [`Self::NotCurrentContext`] to indicate that the context is a not - /// current to allow sending it to the different thread. + /// [`Self::NotCurrentContext`]. /// /// # Platform specific /// /// - **macOS: this will block if your main thread is blocked.** fn make_not_current(self) -> Result; - /// Make the context not current to the current thread. If you need to + /// Make the context not current on the current thread. If you need to /// send the context to another thread, use [`Self::make_not_current`] /// instead. fn make_not_current_in_place(&self) -> Result<()>; - /// Make [`Self::Surface`] current on the calling thread. + /// Make context current on the calling. The `surface` is used as a target + /// for default framebuffer. /// /// # Platform specific /// /// - **macOS: this will block if your main thread is blocked.** fn make_current(&self, surface: &Self::Surface) -> Result<()>; - /// The same as [`Self::make_current`], but provides a way to set read and - /// draw surfaces explicitly. + /// The same as [`Self::make_current`], but provides a way to set draw and + /// read surfaces explicitly. /// /// # Api specific /// @@ -137,7 +136,7 @@ pub trait PossiblyCurrentGlContext: Sealed { /// # Api specific /// /// - **WGL/GLX:** requires OpenGL 3.0 or greater context and - /// ARB_create_context extensions. + /// `ARB_create_context` extensions. fn make_current_surfaceless(&self) -> Result<()>; } @@ -552,7 +551,7 @@ impl PossiblyCurrentGlContext for PossiblyCurrentContext { } fn make_not_current_in_place(&self) -> Result<()> { - Ok(gl_api_dispatch!(self; Self(context) => context.make_not_current_in_place()?)) + gl_api_dispatch!(self; Self(context) => context.make_not_current_in_place()) } fn make_current(&self, surface: &Self::Surface) -> Result<()> {