Skip to content
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

Doesn't seem to work with the version of VTK that ships with ParaView 5.8 #11

Open
waj334 opened this issue Apr 7, 2020 · 7 comments
Open

Comments

@waj334
Copy link

waj334 commented Apr 7, 2020

Has anyone gotten this to work with a recent version of VTK? All I get is a white background and a open button. It seems to load in models, but rendering is not working.

@waj334
Copy link
Author

waj334 commented Apr 8, 2020

Decided to run my program attached to RenderDoc to see what's going on and found that VTK renders ok on the first color pass, but then Qt Quick starts the second pass by rendering a filled quad on the entire viewport. I haven't found a way to make Qt Quick not do that.

@waj334
Copy link
Author

waj334 commented Apr 8, 2020

Upon further testing, my assumption above was incorrect. The problem is vtkGenericOpenGLRenderWindow::Start binds it's own frame buffer after Qt Quick had already bound the one to be rendered in. So I reimplemented vtkGenericOpenGLRenderWindow::Start to re-bind Qt Quicks fbo and it renders something.

@latnec
Copy link

latnec commented Apr 14, 2020

@waj334 How did you do that? You re implemented vtkGenericOpenGLRenderWindow::Start in VTK and recompiled that?

@waj334
Copy link
Author

waj334 commented Apr 15, 2020

I guess "overrode" would have been a better word to use. I inherited vtkGenericOpenGLRenderWindow from a new class and overrode vtkGenericOpenGLRenderWindow::Start function to make it re-bind the FBO coming from Qt Quick and I overrode vtkGenericOpenGLRenderWindow::End to make it do absolutely nothing. The only problem I ran into after that is the clear color set by VTK didn't work properly, so I just let Qt Quick clear it's frame buffer using the color set in VTK. The end result looked perfectly fine.

@latnec
Copy link

latnec commented Apr 15, 2020

@waj334 Thank you for the reply. I think I've tried that with no success. Any chance you can make a branch?

Btw, I am using Qt 5.12, latest VTK (commit abbc884cf314c663958ee08690c6bf2fb15ebe2b).

@latnec
Copy link

latnec commented Apr 17, 2020

I was able to get the code running (with only 2 includes) with Qt 5.12 and VTK 6.3.0 (commit 21df122f4186aec9baae298bfc35b5a380869748).

It seems like the breaking change is in VTK.

@latnec
Copy link

latnec commented Apr 17, 2020

Well, this is strange. Tested and it works with

Qt 5.12 and VTK 7.1.1 (b86da7eef93f75c4a7f524b3644523ae6b651bc4)
Qt 5.12 and VTK 8.0 (782d7edff3a27317506e3f144952c6437c4f658d)
Qt 5.12 and VTK 8.2 (e3de2c35c9f44fd6d16ad4c6b6527de7c4f677c7)

I assume the RC have an issue?

@waj334 In my testes above, I did not have to subclass vtkGenericOpenGLRenderWindow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants