Skip to content

Instantly share code, notes, and snippets.

View almarklein's full-sized avatar

Almar Klein almarklein

View GitHub Profile
from wgpu.gui.auto import WgpuCanvas, run
import pygfx as gfx
import pylinalg as la
import numpy as np
def set_position(ob, pos):
# compat between old and new api
if hasattr(ob, "local"):
ob.local.position = pos
"""
In https://github.com/pygfx/wgpu-py/issues/114 we tried to find a way
to invalidate numpy/memoryview views when the base memory was released.
This file lists some attempts (and related cases) that demonstrates how
thet do not work.
In the end, we've not found a way to do it.
"""
import ctypes