{ "info": { "author": "Tim Pederick", "author_email": "pederick@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics", "Topic :: Software Development :: Libraries" ], "description": "==============================\r\nPegl: Python 3 binding for EGL\r\n==============================\r\n\r\nPegl is a binding to EGL_ 1.4, written in native Python 3 through the\r\nctypes_ library. It provides comprehensive access to EGL_ functions,\r\nwhile offering a very Pythonic API.\r\n\r\nEGL_ is a specification from the Khronos Group that provides an\r\nintermediate layer between other Khronos specifications (OpenGL, OpenGL\r\nES, OpenVG), called \"client APIs\", and the native graphics system. EGL_\r\ncan supply an implicit rendering context for each of the client APIs,\r\nas well as features like surfaces and buffering.\r\n\r\nPegl wraps EGL_ version 1.4. It is unlikely to be backwards compatible\r\nwith previous versions of the specification.\r\n\r\n.. _EGL: http://www.khronos.org/egl\r\n.. _ctypes: http://docs.python.org/py3k/library/ctypes\r\n\r\nRoadmap\r\n=======\r\n\r\nThe current Pegl version is 0.1a4_1.4. As an alpha version, care should\r\nbe taken before making use of the library; it wraps the complete EGL API\r\nand all intended extensions, but it is very much untested.\r\n\r\nPegl version numbers are in this format:\r\n\r\n ``w.x_y.z``\r\n\r\nwhere ``w.x`` represents the major/minor Pegl release (including alpha,\r\nbeta or release candidate status, if appropriate), and ``y.z`` represents\r\nthe EGL version being wrapped.\r\n\r\n----------\r\n0.x series\r\n----------\r\n\r\nReleases in this series will provide a wrapper that is Pythonic, but\r\nstill fairly low-level, and the API is not guaranteed to be stable.\r\n\r\n----------\r\n1.x series\r\n----------\r\n\r\nOnce the basic Pegl functionality is tested and considered usable, I\r\nwill aim to improve the API, so that an EGL environment can be set up\r\nwith a minimum of code. When I'm happy with the results, version\r\nnumbers will be bumped up to 1.x, and some assurance of API stability\r\nwill be given.\r\n\r\nLicense\r\n=======\r\n\r\nPegl is free software, released under the `GNU GPLv3`_. See the file\r\n``COPYING`` and individual source files for the full license terms.\r\n\r\n.. _GNU GPLv3: http://www.gnu.org/licenses/gpl\r\n\r\nUse\r\n===\r\nA typical use case might feature these steps:\r\n\r\n1. Create a ``Display`` instance (`pegl.display`_).\r\n2. Import whatever attribute objects (`pegl.attribs`_) you need to\r\n express your requirements\r\n3. Get a ``Config`` instance (`pegl.config`_) to match your\r\n requirements.\r\n4. Bind the client API you want to use (`pegl.context`_).\r\n5. Get a ``Context`` instance (`pegl.context`_) and/or a ``Surface``\r\n instance (`pegl.surface`_), as necessary.\r\n6. Do your work in the client API.\r\n7. Repeat from step 4 to mix different client APIs in the one\r\n application.\r\n\r\nSample code for steps 1 to 5 might look like this:\r\n\r\n>>> import pegl\r\n>>> from pegl.attribs.config import ClientAPIs, CBufferTypes\r\n>>> from pegl.attribs.context import ContextAPIs\r\n>>> dpy = pegl.display.Display()\r\n>>> conf = pegl.config.get_configs(dpy,\r\n... {'RENDERABLE_TYPE': ClientAPIs(OPENVG=1),\r\n... 'COLOR_BUFFER_TYPE': CBufferTypes.RGB})[0]\r\n>>> pegl.context.bind_api(ContextAPIs.OPENVG)\r\n>>> ctx = pegl.context.Context(dpy, conf)\r\n>>> surf = pegl.surface.PbufferSurface(dpy, conf, {'WIDTH': 640,\r\n... 'HEIGHT': 480})\r\n>>> ctx.make_current(draw_surface=surf)\r\n\r\nThe Library\r\n===========\r\nThe main Pegl package, ``pegl``, contains six modules and two\r\nsubpackages. The top-level package namespace also holds all exception\r\ntypes, plus a few constants and utility functions.\r\n\r\n------------\r\npegl.attribs\r\n------------\r\nThe ``attribs`` subpackage divides the many EGL attributes into modules\r\naccording to the object type to which they apply. These modules contain\r\nvarious named tuples and classes, providing namespaces by which the\r\nattributes are grouped and given symbolic names. Import the ones you\r\nneed, as you need them.\r\n\r\n-----------\r\npegl.config\r\n-----------\r\nThe ``config`` module revolves around the ``Config`` class, which\r\nrepresents a set of EGL configuration options. You will want to obtain\r\na Config that matches your application requirements (color depth, APIs\r\nsupported, etc.) by calling ``get_configs()`` and using one of the\r\nconfigurations it returns. EGL sorts the configurations so that you\r\nwill usually get the best match by choosing the first result.\r\n\r\n------------\r\npegl.context\r\n------------\r\nThe ``context`` module chiefly features the ``Context`` class and the\r\nfunctions ``bind_api()`` and ``bound_api()``. Once you have a\r\nconfiguration, you will usually want to bind an API and then create a\r\n``Context`` instance with your ``Display`` and ``Config``.\r\n\r\n------------\r\npegl.display\r\n------------\r\nAn EGL display is not merely a representation of a physical screen; it\r\nis the basic environment of all EGL operations, and holds details of the\r\nEGL implementation itself. The ``display`` module has a ``Display``\r\nclass that handles all of these functions. Creating a ``Display``\r\ninstance will usually be the first step when using EGL.\r\n\r\n--------\r\npegl.ext\r\n--------\r\nA large selection of EGL extensions are given wrappers in the ``ext``\r\nsubpackage. All non-draft extensions in the EGL Registry as of March\r\n2014 [#]_ are supported, except for the following:\r\n\r\n+-----+----------------------------------+--------------------------------+\r\n|Ext #| Name string | Reason |\r\n+=====+==================================+================================+\r\n|1 |``EGL_KHR_config_attribs`` |Now part of core EGL. |\r\n+-----+----------------------------------+--------------------------------+\r\n|17 |``EGL_NV_coverage_sample`` |NVIDIA proprietary. |\r\n+-----+----------------------------------+ |\r\n|18 |``EGL_NV_depth_nonlinear`` | |\r\n+-----+----------------------------------+--------------------------------+\r\n|24 |``EGL_HI_clientpixmap`` |Underspecified; specifically, |\r\n| | |``EGL_CLIENT_PIXMAP_POINTER_HI``|\r\n| | |is undefined. |\r\n+-----+----------------------------------+--------------------------------+\r\n|25 |``EGL_HI_colorformats`` |Seems pointless without the |\r\n| | |above. Also, its enum values are|\r\n| | |missing from ``eglenum.spec``. |\r\n+-----+----------------------------------+--------------------------------+\r\n|30 |``EGL_NV_coverage_sample_resolve``|NVIDIA proprietary. |\r\n+-----+----------------------------------+ +\r\n|46 |``EGL_NV_3dvision_surface`` | |\r\n+-----+----------------------------------+--------------------------------+\r\n|61 |``EGL_KHR_get_all_proc_addresses``|Would involve an architectural |\r\n| |and ``EGL_KHR_client_get_`` etc. |change to the ``native`` module.|\r\n+-----+----------------------------------+--------------------------------+\r\n\r\nIn addition, some extensions that are not officially registered, but are\r\nwidely available through the Mesa library, are supported by Pegl:\r\n\r\n* ``EGL_NOK_swap_region``\r\n* ``EGL_WL_bind_wayland_display``\r\n\r\n.. [#] Extension numbers 1 to 6, 8 to 10, 16 to 20, and 23 to 66.\r\n\r\n-----------\r\npegl.native\r\n-----------\r\nThe ``native`` module provides the wrapper around the functions in the\r\nnative EGL library, as well as error checking wrapped around them. It is\r\ngenerally not necessary to access this module in your own applications.\r\n\r\n------------\r\npegl.surface\r\n------------\r\nThe ``surface`` module has classes for the different types of rendering\r\nsurface that EGL supports: on-screen surfaces bound to native windows\r\n(``WindowSurface``), off-screen surfaces bound to pixel buffers\r\n(``PbufferSurface``), and surfaces that render to native pixmap objects\r\n(``PixmapSurface``).\r\n\r\n---------\r\npegl.sync\r\n---------\r\nThe ``sync`` module wraps the small number of core EGL synchronization\r\nfunctions that help ensure that native and client rendering calls do not\r\ninterfere with one another. More advanced synchronization features are\r\navailable in extensions_ (``pegl.ext.khr_sync``, ``pegl.ext.nv_sync``).\r\n\r\n.. _extensions: `pegl.ext`_", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/perey/pegl", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "Pegl", "package_url": "https://pypi.org/project/Pegl/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Pegl/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/perey/pegl" }, "release_url": "https://pypi.org/project/Pegl/0.1a4_1.4/", "requires_dist": null, "requires_python": null, "summary": "Python 3 wrapper for the EGL API", "version": "0.1a4_1.4" }, "last_serial": 1038347, "releases": { "0.1a3~1.4": [ { "comment_text": "", "digests": { "md5": "60bfc195e534ea5b8a092e41bc016a8f", "sha256": "fd1c4a6fd4c0b17f1de418a22e37a523b17ad4574b43954113a9bda1897e4169" }, "downloads": -1, "filename": "Pegl-0.1a3~1.4.tar.gz", "has_sig": false, "md5_digest": "60bfc195e534ea5b8a092e41bc016a8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 59731, "upload_time": "2012-07-10T21:51:11", "url": "https://files.pythonhosted.org/packages/0d/5c/20e72990d5105c97059696a55ac5ac75c0ed2fe827689e1bcfef196e76c5/Pegl-0.1a3~1.4.tar.gz" } ], "0.1a4_1.4": [ { "comment_text": "", "digests": { "md5": "967aa65db8be696572e8d0a79939b01d", "sha256": "221ede82b581eb5318f9fafd31e486d61b28e10406976eba784172af92ae63e9" }, "downloads": -1, "filename": "Pegl-0.1a4_1.4.tar.gz", "has_sig": false, "md5_digest": "967aa65db8be696572e8d0a79939b01d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73566, "upload_time": "2014-03-23T09:49:55", "url": "https://files.pythonhosted.org/packages/29/ba/706b4ffc34f72b4884eb28290a319efa87edd6d06809d37b3d47663a19b4/Pegl-0.1a4_1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "967aa65db8be696572e8d0a79939b01d", "sha256": "221ede82b581eb5318f9fafd31e486d61b28e10406976eba784172af92ae63e9" }, "downloads": -1, "filename": "Pegl-0.1a4_1.4.tar.gz", "has_sig": false, "md5_digest": "967aa65db8be696572e8d0a79939b01d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 73566, "upload_time": "2014-03-23T09:49:55", "url": "https://files.pythonhosted.org/packages/29/ba/706b4ffc34f72b4884eb28290a319efa87edd6d06809d37b3d47663a19b4/Pegl-0.1a4_1.4.tar.gz" } ] }