Skip to main content

glsurface

glsurface is a python class to show 2d/3d data with wxPython and PyOpenGL.

Installation

$ pip install glsurface

Usage

  1. Create a class from TrackingSurface
    class Surface(TrackingSurface):
        def __init__(self, *args, **kwargs):
        TrackingSurface.__init__(self, *args, **kwargs)
        ...
    
  2. Create an instance, and set data (optional)
    class SurfacePanel(wx.Panel):
    
        def __init__(self, parent):
            wx.Panel.__init__(self, parent, -1)
            ...
            self.x = np.linspace(0, 2 * np.pi, 30).reshape((1, 30))
            z = np.cos(self.x).T * np.sin(self.x)
            self.canvas = Surface(self, {'z': z})
            ...
    
  3. Update the data
    1. Add new frame data to the current frame buffer
      self.canvas.NewFrameArrive(z, silent=False)
      
    2. Or reset the frame buffer with new data
      self.canvas.SetFrames(points, reset_buf_len=True, silent=False)
      

Check gltest.py for details.

Known issues

  1. On Linux, it may show the following error.

    OpenGL.error.Error: Attempt to retrieve context when no valid context
    

    In this case, try different OpenGL platform, e.g.,

    $ export PYOPENGL_PLATFORM='egl'
    

    All supported platforms can be found here /path/to/python/site-packages/OpenGL/__init__.py

  2. For EGL Surface, you may need to call CreateSurface, as mentioned here

Metadata

Release files for glsurface 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glsurface 0.1.2
File Size Uploaded Provenance Actions
glsurface-0.1.2.tar.gz 21.0 kB Without provenance Details for glsurface-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glsurface 0.1.2
File Interpreter ABI Platform Actions
glsurface-0.1.2-py3-none-any.whl Python 3 none any Details for glsurface-0.1.2-py3-none-any.whl

Total release size: 41.2 kB

Release files / glsurface-0.1.2.tar.gz

Download URL glsurface-0.1.2.tar.gz
Size 21.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a75819f7548e2cf9c98034a8f610365d883de8fd2ba09f3819b95d8bbc9613bf
BLAKE2b-256 checksum
How to use checksums
bdd29268daf0d0b28303e848a86158f34450b79588e7a705f9665029fbca1efd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Release files / glsurface-0.1.2-py3-none-any.whl

Download URL glsurface-0.1.2-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad9fa527b09d510a83e2c9e440adf8d35f539988d1b91f920c437d4de0f55780
BLAKE2b-256 checksum
How to use checksums
c6c149eb32d83b7f6a220feaeedd78257517654c08513ece7589343926f73c1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.5

Security for glsurface 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page