Skip to content

Commit

Permalink
Merge branch 'shape_instancer_fix' into 'main'
Browse files Browse the repository at this point in the history
Shape instancer __new__() method fix

See merge request omniverse/warp!616
  • Loading branch information
daedalus5 committed Jul 10, 2024
2 parents 8d73f8e + bd50a85 commit 69c5b8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
- Fixed differentiability of `wp.fem.PicQuadrature` w.r.t. positions and measures
- Improve error messages for unsupported constructs
- Update `wp.matmul()` CPU fallback to use dtype explicitly in `np.matmul()` call
- Fix ShapeInstancer `__new__()` method (missing instance return and `*args` parameter)

## [1.2.2] - 2024-07-04

Expand Down
3 changes: 2 additions & 1 deletion warp/render/render_opengl.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,10 +666,11 @@ class ShapeInstancer:
[3D point, 3D normal, UV texture coordinates]
"""

def __new__(cls):
def __new__(cls, *args, **kwargs):
instance = super(ShapeInstancer, cls).__new__(cls)
instance.instance_transform_gl_buffer = None
instance.vao = None
return instance

def __init__(self, shape_shader, device):
self.shape_shader = shape_shader
Expand Down

0 comments on commit 69c5b8b

Please sign in to comment.