Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc fixes #206

Merged
merged 18 commits into from
Nov 30, 2024
25 changes: 25 additions & 0 deletions .gitatttributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Explicitly declare text files you want to always be normalized and converted
# to native line endings on checkout.
*.py text diff=python
*.txt text
*.rst text
*.md text
Makefile text
makefile text

# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.ttf binary
*.mp3 binary
*.gif binary
*.wav binary
*.gltf binary
*.glb binary
*.obj binary
8 changes: 4 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Lint with ruff
run: |
ruff check
- name: Test with pytest
run: |
# TODO: Figure out if we can run headless tests
pytest tests/test_docs.py
# - name: Test with pytest
# run: |
# # TODO: Figure out if we can run headless tests
# pytest tests/test_docs.py
6 changes: 6 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ def __getattr__(cls: Any, name: Any) -> MagicMock:
"pywavefront",
"pywavefront.obj",
"trimesh",
"pygame",
"pygame._sdl2",
"pygame.display",
"pygame.event",
"pyopengltk",
"pyopengltk.OpenGLFrame",
]

sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/resource_system.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
~~~~~~~~
Expand Down
18 changes: 9 additions & 9 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand All @@ -33,14 +33,14 @@ creation and resource loading simple.
reference/screenshot.rst
reference/context/index
reference/geometry
reference/loaders/index
reference/meta/index
reference/finders/index
reference/loaders
reference/meta
reference/finders
reference/opengl/index
reference/resources/index
reference/timers/index
reference/resources
reference/timers
reference/utils/index
reference/scene/index
reference/scene


Indices and tables
Expand Down
74 changes: 74 additions & 0 deletions docs/reference/context/backends.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

.. py:module:: moderngl_window
.. py:currentmodule:: moderngl_window


Window Backends
===============

pyglet
------

.. autoclass:: moderngl_window.context.pyglet.window.Window
:members:
:inherited-members:
:show-inheritance:

glfw
----

.. autoclass:: moderngl_window.context.glfw.window.Window
:members:
:inherited-members:
:show-inheritance:

sdl2
----

.. autoclass:: moderngl_window.context.sdl2.window.Window
:members:
:inherited-members:
:show-inheritance:


pygame
------

.. autoclass:: moderngl_window.context.pygame2.window.Window
:members:
:inherited-members:
:show-inheritance:


Pyside2
-------

.. autoclass:: moderngl_window.context.pyside2.window.Window
:members:
:inherited-members:
:show-inheritance:


PyQt5
-----

.. autoclass:: moderngl_window.context.pyqt5.window.Window
:members:
:inherited-members:
:show-inheritance:

tkinter
-------

.. autoclass:: moderngl_window.context.tk.window.Window
:members:
:inherited-members:
:show-inheritance:

headless
--------

.. autoclass:: moderngl_window.context.headless.window.Window
:members:
:inherited-members:
:show-inheritance:
15 changes: 15 additions & 0 deletions docs/reference/context/base.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

.. py:module:: moderngl_window.context.base.window
.. py:currentmodule:: moderngl_window.context.base.window
.. autoclass:: WindowConfig
:members:
:inherited-members:
:show-inheritance:


.. autoclass:: BaseWindow
:members:
:inherited-members:
:show-inheritance:
84 changes: 0 additions & 84 deletions docs/reference/context/basewindow.rst

This file was deleted.

98 changes: 0 additions & 98 deletions docs/reference/context/glfw.window.rst

This file was deleted.

Loading