OpenGeoscience / vtkMap

vtkMap
24 stars 13 forks source link

Support layering through RenderPasses #85

Closed alvarosan closed 7 years ago

alvarosan commented 7 years ago

@johnkit @aashish24 , here is the current version, let me know what you think. As it is, both examples work. In the end I decided to keep a vector of actors per vtkGeoMapLayerPass to avoid having to traverse the global array from vtkRenderer. I will try it out with DataBrowser and if things go well with selection I will move on and finish up the layer-manipulation API in vtkMap.

alvarosan commented 7 years ago

One thing to bear in mind is that by keeping a separate vector of vtkProps per render pass actor culling and visibility (already handled by vtkRenderer) might also need to be checked per render pass. Because of this, I am starting to lean towards looping through the global (already filtered by vtkRenderer regarding culling and visibility) list. Not a major change at this point so I will probably try this tomorrow. Thoughts @johnkit @aashish24 ?

johnkit commented 7 years ago

Let's discuss this afternoon.

alvarosan commented 7 years ago

@johnkit @aashish24 , this version is in very good shape in case you want to have a look at the implementation. Seems to integrate seamlessly in DataBrowser (selection working and showing a simpler rubber band). I will solve the conflicts next.

aashish24 commented 7 years ago

Roger that @alvarosan @johnkit I will get the reviews our by Monday

johnkit commented 7 years ago

Hey @alvarosan Is there a file missing? A couple places #include a vtkMap_typedef.h file, but I don't seem to have that when I checkout out your branch.

alvarosan commented 7 years ago

I added that file, probably missed to check it in, sorry for that.

alvarosan commented 7 years ago

Done @johnkit

johnkit commented 7 years ago

In order to build on OSX, I had to explicitly include OpenGL link libraries, because of the call to glDisable(GL_DEPTH_TEST). Are you OK adding this patch (or something equivalent) to the CMakeLists.txt file: diff.txt

alvarosan commented 7 years ago

Sure, I can add the patch.

alvarosan commented 7 years ago

@johnkit , added CMakeLists.txt patch to include OpenGL.

johnkit commented 7 years ago

Thanks. Let's go ahead and merge this.

When I run the examples on my OSX build, however, VTK is getting an opengl error, apparently every time it draws. I'll paste below. It's not clear that the rendering passes are at issue, so let's see if this also occurs on other machines.

ERROR: In /Users/john/kitware/es/git/vtk/Rendering/OpenGL2/vtkOpenGLGlyph3DHelper.cxx, line 588
vtkOpenGLGlyph3DHelper (0x7ff0ac850a00): failed after Render 1 OpenGL errors detected
  0 : (1282) Invalid operation
alvarosan commented 7 years ago

@johnkit , could you run DataBrowser using this branch, I would like to know if the issue persists. I could not reproduce it on linux but I will try on bigmac. The error is caught here, but 'Invalid operation' can happen by many reasons so I need to narrow it down to the exact gl call that triggers it. Seems unlikely to be related to render passes though, but it's worth checking.