{ "info": { "author": "Stephan Wenger", "author_email": "wenger@cg.cs.tu-bs.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Software Development :: Libraries" ], "description": "``glitter`` is an intuitive wrapper around OpenGL 3 and up.\n\nCode example\n============\n\nThe following code creates a window displaying a rotating quad::\n\n from math import cos, sin\n from glitter import VertexArray, get_default_program\n from glitter.contexts.glut import GlutWindow, main_loop, get_elapsed_time\n\n vertices = ((0, 0, 0), (-1, 1, 0), (1, 1, 0), (1, -1, 0), (-1, -1, 0))\n colors = ((1, 1, 1), (0, 1, 0), (0, 0, 1), (0, 1, 1), (1, 0, 0))\n indices = ((0, 1, 2), (0, 2, 3), (0, 3, 4), (0, 4, 1))\n\n def display():\n window.clear()\n vao.draw()\n window.swap_buffers()\n\n def timer():\n phi = get_elapsed_time()\n shader.modelview_matrix = (\n\t\t\t( cos(phi), sin(phi), 0, 0),\n\t\t\t(-sin(phi), cos(phi), 0, 0),\n\t\t\t( 0, 0, 1, 0),\n\t\t\t( 0, 0, 0, 2)\n\t\t)\n window.add_timer(10, timer)\n window.post_redisplay()\n\n if __name__ == \"__main__\":\n window = GlutWindow(double=True, multisample=True)\n window.display_callback = display\n shader = get_default_program()\n vao = VertexArray([vertices, colors], elements=indices)\n timer()\n with shader:\n main_loop()\n\nDesign principles\n=================\n\n- Glitter wraps the OpenGL 3 core profile only. This allows for a pythonic\n representation of (eventually) the complete OpenGL API, while any nuts and\n bolts are readily supplied by Python and numpy.\n\n- Inituitive use is chosen over performance (no premature optimization; make it\n run, then make it fast). Users do not need to (nor should they) use raw GL\n functions at any time.\n\n- OpenGL objects (e.g., textures, buffers, or shader programs) are represented\n by Python objects.\n\n- All GL state changes go through either a context object or a responsible\n object, for example:\n\n\t- Vertex attribute pointer bindings are performed by vertex array objects.\n\n\t- Settings for draw buffers other than the screen are performed by\n\t framebuffer objects.\n\n\t- Texture bindings are performed by shader programs. An available texture\n\t unit is chosen automatically.\n\n- Array data (e.g. texture images or vertex buffer data) is represented in\n numpy.\n\n- Glitter has a focus on GPGPU computing, but typical use for rendering\n should be as easy.\n\n- Platform independence is be sought for, although Linux/GLX is currently the\n primary target. Any experiences with other platforms are very welcome.\n\nDependencies\n============\n\n- gccxml: http://www.gccxml.org\n\n- ctypeslib: http://pypi.python.org/pypi/ctypeslib\n\nBuild instructions\n==================\n\n- installing: ``sudo python setup.py install``\n\n- docs: ``cd docs; ./build.sh``\n\n- tests: ``nosetests tests``\n\n- installing with Python 3: run ``python setup.py build`` with Python 2, then\n ``2to3 -w build`` and manually install the files from the build folder\n\nOpenGL 3 notes\n==============\n\nThe distribution includes the official OpenGL 3 header file from\nhttp://www.opengl.org/registry/api/gl3.h, with the following bugfixes applied:\n\nThe following functions are not part of the core profile and have been\nremoved::\n\n GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);\n GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);\n GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);\n GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);\n GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);\n GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);\n GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);\n GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);\n GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);\n GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);\n GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);\n GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);\n GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);\n GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);\n GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);\n GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);\n GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);\n GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);\n GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);\n GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);\n GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);\n GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);\n\nThe following constants are missing and have been defined::\n\n #define GL_POLYGON_MODE 0x0B40\n\nChangelog\n=========\n\nThe following versions introduced noteworthy features, bug fixes, or API changes:\n\nversion 0.1.7\n-----------\n- Fix GLUT modifier key functions.\n- Add rudimentary support for ``glReadPixels`` on ``Context`` objects.\n- Fix glActiveTexture call when calling bind() on already bound ``Texture``.\n\nversion 0.1.6\n-------------\n- Add support for depth and stencil textures.\n- Additional examples.\n- Python 3 compatibility (built distribution only, not build script).\n- Add GLX and dummy contexts (GLX context via separate glxcontext package), GLX is now the default if available.\n- Fix ``Framebuffer`` viewport.\n- Rename and add parameters to copy pipeline.\n- Add convenience matrix functions.\n- Fix setattr bug in ``Pipeline``.\n\nversion 0.1.5\n-------------\n- Add support for integer sampler types in ``glitter.convenience``.\n\nversion 0.1.4\n-------------\n- ``Framebuffer``\\s expect attributes as separate ``__init__()`` parameters instead of a list.\n- Implement mesh loading from HDF5.\n- Fix context bugs in ``VertexArray``, ``Pipeline``, and ``ShaderProgram``.\n- Fix shader proxies in ``Pipeline``.\n- ``Pipeline`` now uses the currently bound framebuffer instead of the default framebuffer.\n- Add context properties to ``Pipeline``.\n\nversion 0.1.3\n-------------\n\n- Introduce literate example programs.\n- ``ArrayBuffer``\\s determine the primitive type and check the buffer dimensions separately.\n- ``GLObject``\\s accept a ``context`` parameter to ``__init__()``.\n- ``VertexArray``\\s expect attributes as separate ``__init__()`` parameters instead of a list.\n- Fix bug in ``ContextManger`` (did not call ``_bind()``) and add caching.\n- Cast parameters that should be ``EnumConstant``\\s into the appropriate types and accept constant names in addition to constant objects.\n- Add Qt support via PySide or PyQt4.\n- Add plausibility checks to avoid huge memory allocation when a ``Context`` object was created without a valid OpenGL context.\n- Make color and modelview matrix optional in ``defaultpipeline``.", "description_content_type": null, "docs_url": "https://pythonhosted.org/glitter/", "download_url": "http://pypi.python.org/pypi/glitter", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://packages.python.org/glitter", "keywords": "opengl,graphics", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "glitter", "package_url": "https://pypi.org/project/glitter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/glitter/", "project_urls": { "Download": "http://pypi.python.org/pypi/glitter", "Homepage": "http://packages.python.org/glitter" }, "release_url": "https://pypi.org/project/glitter/0.1.7/", "requires_dist": null, "requires_python": null, "summary": "Intuitive OpenGL wrappers", "version": "0.1.7" }, "last_serial": 1057564, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "554d0afc6f6b0c623f6af6f4fbd0a600", "sha256": "c2918a1479cc28b8cc0a73fa25623a20cbc93f798cbf50030d791be41fd0de77" }, "downloads": -1, "filename": "glitter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "554d0afc6f6b0c623f6af6f4fbd0a600", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 82573, "upload_time": "2012-03-13T09:54:49", "url": "https://files.pythonhosted.org/packages/fb/02/111fcbb97ef217950886f907beb1a65375b99c7b586bb4dce696acaa0a35/glitter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "78e85f600e4bdcf5015bd535522b1d7d", "sha256": "76c558d9b631e0a26f6d9c1f6d7fe7a4cdd6ff22c11db42493a2f8ae7cd1f558" }, "downloads": -1, "filename": "glitter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "78e85f600e4bdcf5015bd535522b1d7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 83231, "upload_time": "2012-03-13T10:31:15", "url": "https://files.pythonhosted.org/packages/fe/49/3680827c784c3e30152a767fc98e3f4e4699f00fcb1d3a7ba61a49a4dcc3/glitter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "55b0fd923b8735a7bfbe0806c95ce2aa", "sha256": "6e5b065dcb9aa18fb28bf56b849b24be122fc4df1731a4041915333c98e52927" }, "downloads": -1, "filename": "glitter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "55b0fd923b8735a7bfbe0806c95ce2aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 84867, "upload_time": "2012-03-14T15:51:31", "url": "https://files.pythonhosted.org/packages/d2/f5/38777f488b9e6d46c385d7d64b8e19bc0c1eda5a6bb4eb751c73d5a72b11/glitter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "195587c7c99d753d61ccf9042ff07807", "sha256": "d7cfc3f264ccd2f8f9cbda444a2f21f0d5b6ca85abbf3a6a8f5fb456192b6dd9" }, "downloads": -1, "filename": "glitter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "195587c7c99d753d61ccf9042ff07807", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 93241, "upload_time": "2012-03-15T14:55:40", "url": "https://files.pythonhosted.org/packages/a7/b4/a0ffef2c55a1ce2ead7fa3f9735286be65818a8ff2ddaa00e123e3e31d04/glitter-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "67d5f3a0b20d3c034e92fa6ef270079c", "sha256": "4ba0779f35ce75e81d941ed30bcb60746ef9333945696ac5261d63bddb6fadfd" }, "downloads": -1, "filename": "glitter-0.1.4.tar.gz", "has_sig": false, "md5_digest": "67d5f3a0b20d3c034e92fa6ef270079c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 99076, "upload_time": "2012-03-16T17:53:26", "url": "https://files.pythonhosted.org/packages/16/47/c701e4c19ce1ce2bf98d7ce23a11d6f641ef6cc9bb664200681d266a5fda/glitter-0.1.4.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "63a1a503dcef4d31f1aa6a9c938ae4fe", "sha256": "e44f94aa89f6f2cfb317b723421c497539d350d46df46b2f78d59759cc55d07b" }, "downloads": -1, "filename": "glitter-0.1.6.tar.gz", "has_sig": false, "md5_digest": "63a1a503dcef4d31f1aa6a9c938ae4fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 104038, "upload_time": "2012-08-29T11:39:59", "url": "https://files.pythonhosted.org/packages/73/a3/70242f146a02c1748ee985afe5174d1a477ceb07c07932df17df3400fb93/glitter-0.1.6.tar.gz" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "e8fdbfac181fed4046ffdd075116b9d5", "sha256": "d2c7cc0dff0f4ceaa008084b13a28c18da3e100c680bb55754457720f3bb3fc9" }, "downloads": -1, "filename": "glitter-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e8fdbfac181fed4046ffdd075116b9d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 265692, "upload_time": "2014-04-11T09:26:12", "url": "https://files.pythonhosted.org/packages/4c/9a/f8443bd7bc71d7d59e00d1ddb26ec16920c73f38895d1d673b1414e7efb4/glitter-0.1.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8fdbfac181fed4046ffdd075116b9d5", "sha256": "d2c7cc0dff0f4ceaa008084b13a28c18da3e100c680bb55754457720f3bb3fc9" }, "downloads": -1, "filename": "glitter-0.1.7.tar.gz", "has_sig": false, "md5_digest": "e8fdbfac181fed4046ffdd075116b9d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 265692, "upload_time": "2014-04-11T09:26:12", "url": "https://files.pythonhosted.org/packages/4c/9a/f8443bd7bc71d7d59e00d1ddb26ec16920c73f38895d1d673b1414e7efb4/glitter-0.1.7.tar.gz" } ] }