{"id":28193144,"url":"https://github.com/tianzhuqiao/glsurface","last_synced_at":"2026-02-19T15:03:09.142Z","repository":{"id":144566475,"uuid":"125960477","full_name":"tianzhuqiao/glsurface","owner":"tianzhuqiao","description":"show 2d/3d data with wxpython and pyopengl","archived":false,"fork":false,"pushed_at":"2025-03-01T00:00:03.000Z","size":8731,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-10T22:32:15.937Z","etag":null,"topics":["opengl","pyopengl","wxpython"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tianzhuqiao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-03-20T04:25:18.000Z","updated_at":"2025-06-04T15:51:17.000Z","dependencies_parsed_at":"2025-02-25T01:31:32.054Z","dependency_job_id":null,"html_url":"https://github.com/tianzhuqiao/glsurface","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tianzhuqiao/glsurface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianzhuqiao%2Fglsurface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianzhuqiao%2Fglsurface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianzhuqiao%2Fglsurface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianzhuqiao%2Fglsurface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tianzhuqiao","download_url":"https://codeload.github.com/tianzhuqiao/glsurface/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tianzhuqiao%2Fglsurface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29619151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T13:04:20.082Z","status":"ssl_error","status_checked_at":"2026-02-19T13:03:33.775Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opengl","pyopengl","wxpython"],"created_at":"2025-05-16T12:16:44.954Z","updated_at":"2026-02-19T15:03:09.108Z","avatar_url":"https://github.com/tianzhuqiao.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# glsurface\n**glsurface** is a python class to show 2d/3d data with [wxPython](https://wxpython.org/) and [PyOpenGL](https://pyopengl.sourceforge.net/).\n\n## Installation\n```shell\n$ pip install glsurface\n```\n\n## Usage\n1. Create a class from `TrackingSurface`\n    ```python\n    class Surface(TrackingSurface):\n        def __init__(self, *args, **kwargs):\n        TrackingSurface.__init__(self, *args, **kwargs)\n        ...\n    ```\n2. Create an instance, and set data (optional)\n    ```python\n    class SurfacePanel(wx.Panel):\n\n        def __init__(self, parent):\n            wx.Panel.__init__(self, parent, -1)\n            ...\n            self.x = np.linspace(0, 2 * np.pi, 30).reshape((1, 30))\n            z = np.cos(self.x).T * np.sin(self.x)\n            self.canvas = Surface(self, {'z': z})\n            ...\n\n    ```\n3. Update the data\n    1. Add new frame data to the current frame buffer\n        ```python\n        self.canvas.NewFrameArrive(z, silent=False)\n        ```\n    2. Or reset the frame buffer with new data\n        ```python\n        self.canvas.SetFrames(points, reset_buf_len=True, silent=False)\n        ```\nCheck `gltest.py` for details.\n\n## Known issues\n1. On Linux, it may show the following error.\n    ```bash\n    OpenGL.error.Error: Attempt to retrieve context when no valid context\n    ```\n    In this case, try different OpenGL platform, e.g.,\n    ```bash\n    $ export PYOPENGL_PLATFORM='egl'\n    ```\n    All supported platforms can be found here `/path/to/python/site-packages/OpenGL/__init__.py`\n\n2. For EGL Surface, you may need to call `CreateSurface`, as mentioned [here](https://docs.wxpython.org/wx.glcanvas.GLCanvas.html#wx.glcanvas.GLCanvas.CreateSurface)\n\n\u003cimg src=\"https://github.com/tianzhuqiao/glsurface/blob/master/images/demo.gif?raw=true\" width=\"400\"\u003e\u003c/img\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianzhuqiao%2Fglsurface","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftianzhuqiao%2Fglsurface","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftianzhuqiao%2Fglsurface/lists"}