From d1242bc3b143174610a15a328866fb64dd20a3eb Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Fri, 29 Nov 2024 20:15:19 +0100 Subject: [PATCH] Minor doc fixes --- docs/guide/resource_system.rst | 2 +- docs/index.rst | 6 ++--- moderngl_window/context/base/window.py | 34 +++++++++++++++++--------- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/docs/guide/resource_system.rst b/docs/guide/resource_system.rst index 721d497..fbba816 100644 --- a/docs/guide/resource_system.rst +++ b/docs/guide/resource_system.rst @@ -137,7 +137,7 @@ Textures textures.load(TextureDescription(path='wood.png', flip=True, mipmap=True, anisotropy=16.0)) # Load a texture array containing 10 vertically stacked tile textures - textures.load(TextureDescription(path='tiles.png', layers=10, mipmap=True, anisotrpy=8.0)) + textures.load(TextureDescription(path='tiles.png', layers=10, mipmap=True, anisotropy=8.0)) Programs ~~~~~~~~ diff --git a/docs/index.rst b/docs/index.rst index 3d25239..76aa8d2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,9 +9,9 @@ Welcome to moderngl-window's documentation! A cross platform helper library for ModernGL making window creation and resource loading simple. -.. Note:: Please report documentation improvements/issues on github. - - Writing documentation is difficult and we can't do it without you. +.. Note:: Please report documentation improvements/issues on github. + + Writing documentation is difficult and we can't do it without you. Pull requests with documentation improvements are also greatly appreciated. .. toctree:: diff --git a/moderngl_window/context/base/window.py b/moderngl_window/context/base/window.py index 0abe336..bc0c2da 100644 --- a/moderngl_window/context/base/window.py +++ b/moderngl_window/context/base/window.py @@ -101,18 +101,28 @@ def __init__( ) -> None: """Initialize a window instance. - Args: - title (str): The window title - gl_version (tuple): Major and minor version of the opengl context to create - size (tuple): Window size x, y - resizable (bool): Should the window be resizable? - visible (bool): Should the window be visible when created? - fullscreen (bool): Open window in fullscreen mode - vsync (bool): Enable/disable vsync - aspect_ratio (float): The desired fixed aspect ratio. Can be set to ``None`` to make - aspect ratio be based on the actual window size. - samples (int): Number of MSAA samples for the default framebuffer - cursor (bool): Enable/disable displaying the cursor inside the window + Keyword Args: + title: + The window title + gl_version: + Major and minor version of the opengl context to create + size: + indow size x, y + resizable: + Should the window be resizable? + visible: + Should the window be visible when created? + fullscreen: + Open window in fullscreen mode + vsync: + Enable/disable vsync + aspect_ratio: + The desired fixed aspect ratio. Can be set to ``None`` to make + aspect ratio be based on the actual window size. + samples: + Number of MSAA samples for the default framebuffer + cursor: + Enable/disable displaying the cursor inside the window """ # Window parameters self._title = title