scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
62 stars 17 forks source link

sciview window blanks out sometimes on repaint, and starts blank #468

Open ctrueden opened 1 year ago

ctrueden commented 1 year ago

Here is how sciview looks when I first launch it:

sciview-initial-actual

If I resize the window to force a validate/repaint or whatnot, I can get the canvas+grid to appear. But when resizing, it flickers gray and sometimes ends up solid gray again, until I tweak it. Some kind of painting race condition perhaps, or maybe a graphics driver issue? I have seen this before with Java 3D windows many years ago—it's kind of funny that we still have this problem with 3D viz in 2023.

kephale commented 1 year ago

Hmm... I haven't seen this for a while [and don't see it on MacOS]. I can test on Linux in a bit.

ctrueden commented 1 year ago

How can I tell whether I'm running OpenGL vs Vulkan? I could check if it even happens on Vulkan...

kephale commented 1 year ago

In the interpreter/REPL in sciview you can run: sciview.getSceneryRenderer()

smlpt commented 1 year ago

This happens to me too. Windows 10 with 1.25x display scaling, running today's master branch and using Vulkan. I also noticed that after loading the Mesh demo and resizing the side panel a couple of times, the canvas stays blank and no windows resizing, movement or side panel adjustment will bring it back. I don't know much about debugging in sciview, but I'm happy to assist where I can.

ctrueden commented 1 year ago

@smlpt Interesting—for me it doesn't ever get "stuck": I can always bring it back via another window resizing operation or two. FWIW, I'm on Ubuntu Linux with X11 and Vulkan renderer.

I am guessing this issue will need to be fixed at the scenery level. My next steps to debug this would be: