[HN Gopher] Pygfx
       ___________________________________________________________________
        
       Pygfx
        
       Author : figomore
       Score  : 104 points
       Date   : 2024-10-22 22:10 UTC (3 days ago)
        
 (HTM) web link (docs.pygfx.org)
 (TXT) w3m dump (docs.pygfx.org)
        
       | MiliasGeiger wrote:
       | I used to love making physics visualizations using VPython[1]!
       | It's awesome to see similar tools pop up. I gave up on VPython
       | after python3, since it was a pain to migrate.
       | 
       | [1]: https://vpython.org/
        
       | prideout wrote:
       | Am I the only one who is irked by by ads on Read the Docs pages?
        
         | BiteCode_dev wrote:
         | Yes, because all the other people on HN use unlock origin.
        
         | stavros wrote:
         | The what?
        
       | blt wrote:
       | this looks similar to VisPy (https://vispy.org/), are there any
       | major differences?
        
         | cipherself wrote:
         | Pygfx uses webgpu while VisPy uses OpenGL.
        
         | hmaarrfk wrote:
         | From the same developer ;)
        
       | sevensor wrote:
       | Suppose I want to wrap a GUI around my visualization. Can I hand
       | pygfx a surface I created with a GUI tool kit?
        
         | figomore wrote:
         | It's possible to use Pygfx with Qt and WX.
        
           | sevensor wrote:
           | Nice! That's what I was hoping to hear!
        
       | westurner wrote:
       | pygfx/pygfx: https://github.com/pygfx/pygfx :
       | 
       | > _Pygfx (pronounced "py-graphics") is built on wgpu, enabling
       | superior performance and reliability compared to OpenGL-based
       | solutions._
       | 
       | pygfx/wgpu-py: https://github.com/pygfx/wgpu-py/ :
       | 
       | > _A Python implementation of WebGPU_
       | 
       | gfx-rs/wgpu: https://github.com/gfx-rs/wgpu :
       | 
       | > _wgpu is a cross-platform, safe, pure-rust graphics API. It
       | runs natively on Vulkan, Metal, D3D12, and OpenGL; and on top of
       | WebGL2 and WebGPU on wasm._
       | 
       | > _The API is based on the WebGPU standard. It serves as the core
       | of the WebGPU integration in Firefox and Deno_
        
         | the__alchemist wrote:
         | I was/am a bit confused: I think this is unrelated to the wgpu
         | cross-API toolkit in rust, it just abbreviated WebGpu the same
         | way?
        
           | samtheprogram wrote:
           | Per the `wgpu-py` README:
           | 
           | > Technically speaking, wgpu-py is a wrapper for wgpu-native,
           | exposing its functionality with a Pythonic API closely
           | resembling the WebGPU spec.
           | 
           | `wgpu-native` is a wrapper with FFI/bindings for the Rust
           | `wgpu` per their READMEs
        
           | westurner wrote:
           | Same, I had assumed they weren't independent.
           | 
           | /?PyPI wgpu: https://pypi.org/search/?q=wgpu
           | 
           | Looks like xgpu is where it's actually at.
           | 
           | xgpu: https://github.com/pyrym/xgpu :
           | 
           | > _xgpu is an aggressively typed, red-squiggle-free Python
           | binding of wgpu-native, autogenerated from the upstream C
           | headers_
           | 
           | wgpu-py has a conda-forge package:
           | https://anaconda.org/conda-forge/wgpu-py
        
       | revskill wrote:
       | Readthedocs is such the gold standard of a library documentation,
       | it contains the complete guide to master the concepts, besides
       | the API.
       | 
       | Other languages, take a look and follow this standard, please.
        
       ___________________________________________________________________
       (page generated 2024-10-25 23:00 UTC)