-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for unsigned int in shaders code #2524
Comments
What error do you get when you use |
Traceback (most recent call last):
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/app/backends/_qt.py", line 903, in paintGL
self._vispy_canvas.events.draw(region=None)
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/util/event.py", line 453, in __call__
self._invoke_callback(cb, event)
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/util/event.py", line 471, in _invoke_callback
_handle_exception(self.ignore_callback_errors,
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/util/event.py", line 469, in _invoke_callback
cb(event)
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 218, in on_draw
self._draw_scene()
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 277, in _draw_scene
self.draw_visual(self.scene)
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/scene/canvas.py", line 315, in draw_visual
node.draw()
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/scene/visuals.py", line 103, in draw
self._visual_superclass.draw(self)
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/visuals/visual.py", line 451, in draw
self._program.draw(self._vshare.draw_mode,
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/visuals/shaders/program.py", line 101, in draw
self.update_variables()
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/visuals/shaders/program.py", line 158, in update_variables
self._process_pending_variables()
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/gloo/program.py", line 303, in _process_pending_variables
self[name] = data
File "/home/czaki/.pyenv/versions/napari/lib/python3.9/site-packages/vispy/gloo/program.py", line 372, in __setitem__
dtype, numel = self._gtypes[type_]
KeyError: 'uint'
|
I'm going to guess an oversight. A quick google doesn't suggest that these types are not in the OpenGL standards we support. Pull requests welcome! Lines 114 to 134 in 6b68262
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As I check, it is not possible to use
uint
anduvecn
in the shaders code. (lack of definition of proper constraints).In napari, we implement a lookup table (see napari/napari#3308 and napari/napari#6182) for coloring labels. I want to use uint to ensure everything fits, but even if they are in OpenGL specification, they cannot be used with vispy.
Is this intentional, or no one request such a feature and you are open to such a contribution?
The text was updated successfully, but these errors were encountered: