diff --git a/docs/index.rst b/docs/index.rst index 76aa8d2d..7e005a37 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,7 +33,7 @@ creation and resource loading simple. reference/screenshot.rst reference/context/index reference/geometry - reference/loaders/index + reference/loaders reference/meta/index reference/finders/index reference/opengl/index diff --git a/docs/reference/loaders.rst b/docs/reference/loaders.rst new file mode 100644 index 00000000..09f6da41 --- /dev/null +++ b/docs/reference/loaders.rst @@ -0,0 +1,117 @@ +.. py:module:: moderngl_window +.. py:currentmodule:: moderngl_window + + +moderngl_window.loaders +======================= + +.. autoclass:: moderngl_window.loaders.base.BaseLoader + :members: + :inherited-members: + :show-inheritance: + :undoc-members: + +Text +---- + +.. autoclass:: moderngl_window.loaders.data.text.Loader + :members: + :show-inheritance: + :undoc-members: + +JSON +---- + +.. autoclass:: moderngl_window.loaders.data.json.Loader + :members: + :show-inheritance: + :undoc-members: + +Binary +------ + +.. autoclass:: moderngl_window.loaders.data.binary.Loader + :members: + :show-inheritance: + :undoc-members: + +Program (Separate) +------------------ + +.. autoclass:: moderngl_window.loaders.program.separate.Loader + :members: + :show-inheritance: + :undoc-members: + +Program (Single) +---------------- + +.. autoclass:: moderngl_window.loaders.program.single.Loader + :members: + :show-inheritance: + :undoc-members: + +GLTF2 +----- + +.. autoclass:: moderngl_window.loaders.scene.gltf2.Loader + :members: + :show-inheritance: + :undoc-members: + + +Wavefront / OBJ +--------------- + +.. autoclass:: moderngl_window.loaders.scene.wavefront.Loader + :members: + :show-inheritance: + :undoc-members: + +STL +--- + +.. autoclass:: moderngl_window.loaders.scene.stl.Loader + :members: + :show-inheritance: + :undoc-members: + +TextureArray +------------ + +.. autoclass:: moderngl_window.loaders.texture.array.Loader + :members: + :show-inheritance: + :undoc-members: + +TextureCube +----------- + +.. autoclass:: moderngl_window.loaders.texture.cube.Loader + :members: + :show-inheritance: + :undoc-members: + +Icon +---- + +.. autoclass:: moderngl_window.loaders.texture.icon.IconLoader + :members: + :show-inheritance: + :undoc-members: + +Texture2D +--------- + +.. autoclass:: moderngl_window.loaders.texture.t2d.Loader + :members: + :show-inheritance: + :undoc-members: + +Pillow +------ + +.. autoclass:: moderngl_window.loaders.texture.pillow.PillowLoader + :members: + :show-inheritance: + :undoc-members: diff --git a/docs/reference/loaders/array.rst b/docs/reference/loaders/array.rst deleted file mode 100644 index 8dcea5a0..00000000 --- a/docs/reference/loaders/array.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.texture.array -.. py:currentmodule:: moderngl_window.loaders.texture.array - -texture.array.Loader -==================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/base.rst b/docs/reference/loaders/base.rst deleted file mode 100644 index fa0a6fa3..00000000 --- a/docs/reference/loaders/base.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.base -.. py:currentmodule:: moderngl_window.loaders.base - -base.BaseLoader -=============== - -Method ------- - -.. automethod:: BaseLoader.__init__ -.. automethod:: BaseLoader.supports_file -.. automethod:: BaseLoader.load - -.. automethod:: BaseLoader.find_data -.. automethod:: BaseLoader.find_program -.. automethod:: BaseLoader.find_texture -.. automethod:: BaseLoader.find_scene - -Attributes ----------- - -.. autoattribute:: BaseLoader.kind -.. autoattribute:: BaseLoader.file_extensions -.. autoattribute:: BaseLoader.ctx diff --git a/docs/reference/loaders/binary.rst b/docs/reference/loaders/binary.rst deleted file mode 100644 index 2a12b182..00000000 --- a/docs/reference/loaders/binary.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.data.binary -.. py:currentmodule:: moderngl_window.loaders.data.binary - -data.binary.Loader -================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/gltf2.rst b/docs/reference/loaders/gltf2.rst deleted file mode 100644 index ca34fae2..00000000 --- a/docs/reference/loaders/gltf2.rst +++ /dev/null @@ -1,42 +0,0 @@ - -.. py:module:: moderngl_window.loaders.scene.gltf2 -.. py:currentmodule:: moderngl_window.loaders.scene.gltf2 - -scene.gltf2.Loader -================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Loader Specific Methods ------------------------ - -.. automethod:: Loader.load_gltf -.. automethod:: Loader.load_glb -.. automethod:: Loader.load_materials -.. automethod:: Loader.load_nodes -.. automethod:: Loader.load_node -.. automethod:: Loader.load_images -.. automethod:: Loader.load_textures -.. automethod:: Loader.load_samplers -.. automethod:: Loader.load_meshes - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx - -Loader Specific Attributes ---------------------------- - -.. autoattribute:: Loader.supported_extensions diff --git a/docs/reference/loaders/index.rst b/docs/reference/loaders/index.rst deleted file mode 100644 index 5fd0c63a..00000000 --- a/docs/reference/loaders/index.rst +++ /dev/null @@ -1,18 +0,0 @@ - -moderngl_window.loaders -======================= - -.. toctree:: - :maxdepth: 2 - - base.rst - t2d - single - separate - array - wavefront - gltf2 - stl - json - text - binary diff --git a/docs/reference/loaders/json.rst b/docs/reference/loaders/json.rst deleted file mode 100644 index fde02a99..00000000 --- a/docs/reference/loaders/json.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.data.json -.. py:currentmodule:: moderngl_window.loaders.data.json - -data.json.Loader -================ - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/separate.rst b/docs/reference/loaders/separate.rst deleted file mode 100644 index 80541816..00000000 --- a/docs/reference/loaders/separate.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.program.separate -.. py:currentmodule:: moderngl_window.loaders.program.separate - -program.separate.Loader -======================= - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/single.rst b/docs/reference/loaders/single.rst deleted file mode 100644 index 332ab403..00000000 --- a/docs/reference/loaders/single.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.program.single -.. py:currentmodule:: moderngl_window.loaders.program.single - -program.single.Loader -===================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/stl.rst b/docs/reference/loaders/stl.rst deleted file mode 100644 index f3303cf6..00000000 --- a/docs/reference/loaders/stl.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.scene.stl -.. py:currentmodule:: moderngl_window.loaders.scene.stl - -scene.stl.Loader -================ - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/t2d.rst b/docs/reference/loaders/t2d.rst deleted file mode 100644 index 84e6b2e2..00000000 --- a/docs/reference/loaders/t2d.rst +++ /dev/null @@ -1,24 +0,0 @@ - -.. py:module:: moderngl_window.loaders.texture.t2d - -texture.t2d.Loader -================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/text.rst b/docs/reference/loaders/text.rst deleted file mode 100644 index 06a71a2b..00000000 --- a/docs/reference/loaders/text.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.data.text -.. py:currentmodule:: moderngl_window.loaders.data.text - -data.text.Loader -================ - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/docs/reference/loaders/wavefront.rst b/docs/reference/loaders/wavefront.rst deleted file mode 100644 index 951407f2..00000000 --- a/docs/reference/loaders/wavefront.rst +++ /dev/null @@ -1,25 +0,0 @@ - -.. py:module:: moderngl_window.loaders.scene.wavefront -.. py:currentmodule:: moderngl_window.loaders.scene.wavefront - -scene.wavefront.Loader -====================== - -Method ------- - -.. automethod:: Loader.__init__ -.. automethod:: Loader.supports_file -.. automethod:: Loader.load - -.. automethod:: Loader.find_data -.. automethod:: Loader.find_program -.. automethod:: Loader.find_texture -.. automethod:: Loader.find_scene - -Attributes ----------- - -.. autoattribute:: Loader.kind -.. autoattribute:: Loader.file_extensions -.. autoattribute:: Loader.ctx diff --git a/moderngl_window/loaders/data/__init__.py b/moderngl_window/loaders/data/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/moderngl_window/loaders/program/__init__.py b/moderngl_window/loaders/program/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/moderngl_window/loaders/scene/__init__.py b/moderngl_window/loaders/scene/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/moderngl_window/loaders/texture/__init__.py b/moderngl_window/loaders/texture/__init__.py new file mode 100644 index 00000000..e69de29b