{ "info": { "author": "Einar Forselv", "author_email": "eforselv@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3 :: Only", "Topic :: Games/Entertainment", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Scientific/Engineering :: Visualization" ], "description": "[![pypi](https://badge.fury.io/py/moderngl-window.svg)](https://pypi.python.org/pypi/moderngl-window) [![rtd](https://readthedocs.org/projects/moderngl-window/badge/?version=latest)](https://moderngl-window.readthedocs.io)\n\n# moderngl_window\n\nA cross platform helper library for [ModernGL](https://github.com/moderngl/moderngl) making window creation and resource loading simple.\n\n* [moderngl_window Documentation](https://moderngl-window.readthedocs.io)\n* [moderngl_window on PyPI](https://pypi.org/project/moderngl-window)\n* [moderngl_window on Github](https://github.com/moderngl/moderngl_window)\n* [ModernGL](https://github.com/moderngl/moderngl)\n* [ModernGL Discord Server](https://discord.gg/UEMtW8D)\n\nPlease report bugs or post questions/feedback on [github](https://github.com/moderngl/moderngl_window/issues).\n\n## Features\n\n* Cross platform support. Tested on Windows 10, Linux and Mac OS X.\n This can save users a lot of time and is often more difficult than most people\n imagine it to be.\n* Easily create a window for ModernGL using Pyglet, PySide2, GLFW, SDL2, PyQt5\n or tkinter supporing window, keyboard and mouse controls. These events are unified\n into a single system so your project can work with any window.\n* Load 2D textures and texture arrays\n* Load shaders as single or multiple `glsl` files\n* Load objects/scenes from wavefront/obj, GLTF 2.0 or STL\n* Resource finder system supporting multiple resource directories\n* A highly pluggable library supporting custom loaders,\n resource finders and windows.\n* Type hints everywhere making code completion and linting a breeze\n\nWe are not trying to force the user into using every aspect of this\nlibrary. If you have an exiting project and just need texture loading\nyou will be able to do this without unnecessary hurdles as long as\nyou provide us your `moderngl.Context`.\n\n## Install\n\n```bash\npip install moderngl-window\n```\n\n## Supported Platforms\n\n* [x] Windows\n* [x] Linux\n* [x] Mac OS X\n\n## Sample Usage\n\nSimple example opening a window clearing every frame using red (color).\n\n```py\n# test.py\nimport moderngl_window as mglw\n\nclass Test(mglw.WindowConfig):\n gl_version = (3, 3)\n\n def render(self, time, frametime):\n self.ctx.clear(1.0, 0.0, 0.0, 0.0)\n\nmglw.run_window_config(Test)\n```\n\nRun the example with different window backends:\n\n```bash\npython test.py --window pyglet\npython test.py --window glfw\npython test.py --window sdl2\npython test.py --window pyside2\npython test.py --window pyqt5\npython test.py --window tkinter\n```\n\n\n`WindowConfig` classes are the simplest way to get started without knowing\na lot about this library. For more advanced usage see documenation\nor examples.\n\n## Setup from source\n\nWe assume the user knows how to handle vitrualenvs.\n\n```bash\n# Install the package in editable mode\n$ pip install -e .\n\n# Set up and dev requirements\npip install -r requirements.txt\npip install -r tests/requirements.txt\n```\n\n## Running Tests\n\nTests are set up with `tox` running pytest with coverage and flake8.\n\n```bash\npip install -r tests/requirements.txt\ntox -e py35\ntox -e py36\ntox -e py37\ntox -e py38\ntox -e pep8\n```\n\n## Building Docs\n\n```bash\npip install -r docs/requirements.txt\npython setup.py build_sphinx\n```\n\n## Contributing\n\nContributions are welcome regardless of experience level.\nDon't hesitate submitting issues, opening partial or completed\npull requests.\n\n### Plugins\n\nWe are interested in contributions providing new loaders, windows etc.\nFor these to be included in this library we require them\nto work cross platforms (win10/linux/osx) and be fairly easy to set up.\n\nIf it requires more than manually downloading a precompiled dll\n(like SDL2, GLEW etc.) it would most likely not be included,\nbut you are welcome to present your case if you still think it should\nbe included.\n\nIf you create your own repo/package containing plugins for\nthis library, please make an issue and we'll link back to it.\nBe sure to include what platforms are suppored, install\ninstructions, how you configure it in `moderngl_window` and\nof course a clear and concise description of what exactly\nyour package provides. \n\n## Attributions\n\nWe can't build everything from scratch. We rely on certain packages\nand resources to make this project possible.\n\n### Windows\n\n* Pyglet (https://github.com/pyglet/pyglet)\n* pyGLFW (https://github.com/FlorianRhiem/pyGLFW)\n* PySDL2 (https://github.com/marcusva/py-sdl2)\n* PySide2 (https://wiki.qt.io/Qt_for_Python)\n* PyQt5 (https://www.riverbankcomputing.com/software/pyqt/intro)\n* tkinter (https://github.com/jonwright/pyopengltk)\n\n### Loaders\n\n* Pillow (https://python-pillow.org/)\n* pywavefront (https://github.com/pywavefront/PyWavefront)\n* trimesh (https://github.com/mikedh/trimesh)\n\n### Testing & Utility\n\n* Pyrr (https://github.com/adamlwgriffiths/Pyrr)\n* numpy (https://github.com/numpy/numpy)\n* pytest (https://docs.pytest.org/en/latest/)\n* flake8 (https://gitlab.com/pycqa/flake8)\n* coverage (https://github.com/nedbat/coveragepy)\n* tox (https://tox.readthedocs.io/en/latest/)\n\n## Resources\n\n* NASA 3D Resources (https://github.com/nasa/NASA-3D-Resources)\n* glTF Sample Models (https://github.com/KhronosGroup/glTF-Sample-Models)\n\n## Some History\n\nThe majority of the code in this library comes from [demosys-py](https://github.com/Contraz/demosys-py) (somewhat modified).\nBecause `demosys-py` is a framework we decided to split out a lot useful functionality into this\nlibrary. Frameworks are a lot less appealing to users and it would be a shame to not make this\nmore available to the ModernGL user base.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/moderngl/moderngl_window", "keywords": "moderngl,window,context", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "moderngl-window", "package_url": "https://pypi.org/project/moderngl-window/", "platform": "any", "project_url": "https://pypi.org/project/moderngl-window/", "project_urls": { "Documentation": "https://moderngl-window.readthedocs.io", "Homepage": "https://github.com/moderngl/moderngl_window", "ModernGL": "https://github.com/moderngl/moderngl" }, "release_url": "https://pypi.org/project/moderngl-window/1.5.2/", "requires_dist": [ "moderngl (<6)", "pyglet (>=1.4.2<2)", "numpy (>=1.16<2)", "pyrr (>=0.10.3<1)", "Pillow (<7,>=5)", "PySDL2 (<1) ; extra == 'pysdl2'", "PySide2 (<6) ; extra == 'pyside2'", "glfw (<2) ; extra == 'glfw'", "PyQt5 (<6) ; extra == 'pyqt5'", "pywavefront (>=1.2.0<2) ; extra == 'pywavefront'", "pyopengltk (>=0.0.3) ; extra == 'tk'", "trimesh (>=3.2.6<4) ; extra == 'trimesh'", "scipy (>=1.3) ; extra == 'trimesh'" ], "requires_python": ">=3.5", "summary": "A cross platform helper library for ModernGL making window creation and resource loading simple", "version": "1.5.2" }, "last_serial": 5997539, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1d56e553c04c08235be7b7b6ad17478b", "sha256": "eab966397ab2f0ea250ebeb1837577c9198a61c29c27fa0fb45bf26e2b2cf408" }, "downloads": -1, "filename": "moderngl_window-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1d56e553c04c08235be7b7b6ad17478b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 86398, "upload_time": "2019-08-03T11:51:53", "url": "https://files.pythonhosted.org/packages/64/d8/d3d146b6742f8cc0d80fa19354c9d3807eedcb234685c4400914ea8479fb/moderngl_window-1.0.0-py3-none-any.whl" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "db31a9d4440873b12a734897fbac9ccb", "sha256": "866c4668b745decfb1d08efd38605de499dc48ee4310d574f0f5cc7085c2871b" }, "downloads": -1, "filename": "moderngl_window-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "db31a9d4440873b12a734897fbac9ccb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 86323, "upload_time": "2019-08-05T00:30:35", "url": "https://files.pythonhosted.org/packages/a2/0f/c6754461a07b044cedf26874a4ff03f480f1cc378c8257be16c3876de0cb/moderngl_window-1.1.0-py3-none-any.whl" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "3c204ba4accc8a92288a3d3da8b5587e", "sha256": "d321ea47775ebf0c906655164ae2366bddf9ca7724954beae343974140281ea3" }, "downloads": -1, "filename": "moderngl_window-1.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3c204ba4accc8a92288a3d3da8b5587e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 87431, "upload_time": "2019-08-10T22:04:39", "url": "https://files.pythonhosted.org/packages/12/51/8b17e5de6eb8223d27f2030d9fdc84f33b9989fb05bf28c45ad603b87742/moderngl_window-1.2.0-py3-none-any.whl" } ], "1.3.0": [ { "comment_text": "", "digests": { "md5": "618c479570427f9a98f9f4b19ec65f0c", "sha256": "d1530f227839c648555a0b48a6d9c22207e0183067f6fe8be46eb12443345d45" }, "downloads": -1, "filename": "moderngl_window-1.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "618c479570427f9a98f9f4b19ec65f0c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 101440, "upload_time": "2019-09-02T20:01:29", "url": "https://files.pythonhosted.org/packages/21/af/42fa9e7f462e1f0e00e1492c21d1ec6d878f514f3093251be69448af1c37/moderngl_window-1.3.0-py3-none-any.whl" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "317a0ad2b1158ff68451ba37c154a772", "sha256": "26f73ee299e24ee3a3ee1ed73b7a67fbead91df1d5af103d2d80607ac99efffb" }, "downloads": -1, "filename": "moderngl_window-1.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "317a0ad2b1158ff68451ba37c154a772", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 103823, "upload_time": "2019-09-30T22:11:58", "url": "https://files.pythonhosted.org/packages/cd/bc/5bae5e6c5a144d75d86675ff517cc24091a969162f67b9bf4c69347707c2/moderngl_window-1.4.0-py3-none-any.whl" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "283635d18bd5cf73a1166c6dde3d07f7", "sha256": "c699ce1e8fd8ae9fee45e831c524c63aa4d87ab544e120ba63e17c31dff6864b" }, "downloads": -1, "filename": "moderngl_window-1.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "283635d18bd5cf73a1166c6dde3d07f7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 100071, "upload_time": "2019-10-09T21:35:13", "url": "https://files.pythonhosted.org/packages/04/d7/c443160a3d535b5bd99124a75dad6c24b2204bb2a3aa841ec7712ed2b83e/moderngl_window-1.5.0-py3-none-any.whl" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "0c20c1284eab43710d9150ec65d74f5a", "sha256": "7a4629f9dab690bdb011f330ff568fd4b4b56d2d6d8a8ed7a033054d41975b53" }, "downloads": -1, "filename": "moderngl_window-1.5.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0c20c1284eab43710d9150ec65d74f5a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 100157, "upload_time": "2019-10-10T15:44:28", "url": "https://files.pythonhosted.org/packages/b7/05/63ac1c671dddaa174d2be32760ea34b0df8faa2cbc27bfa79d63d8e976b6/moderngl_window-1.5.1-py3-none-any.whl" } ], "1.5.2": [ { "comment_text": "", "digests": { "md5": "b6d6642ed7199625d2d027ace50c4c14", "sha256": "6865aebf5574568ef61bed6549a071435ab9af7ed5fec4e5edb2b3bf3dfbf8eb" }, "downloads": -1, "filename": "moderngl_window-1.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b6d6642ed7199625d2d027ace50c4c14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 101344, "upload_time": "2019-10-18T21:06:17", "url": "https://files.pythonhosted.org/packages/14/b5/1732802563e92afd6b021e6ec7d6a4d541cc203031f009f29aca7e29177b/moderngl_window-1.5.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b6d6642ed7199625d2d027ace50c4c14", "sha256": "6865aebf5574568ef61bed6549a071435ab9af7ed5fec4e5edb2b3bf3dfbf8eb" }, "downloads": -1, "filename": "moderngl_window-1.5.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b6d6642ed7199625d2d027ace50c4c14", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 101344, "upload_time": "2019-10-18T21:06:17", "url": "https://files.pythonhosted.org/packages/14/b5/1732802563e92afd6b021e6ec7d6a4d541cc203031f009f29aca7e29177b/moderngl_window-1.5.2-py3-none-any.whl" } ] }