Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • VTK VTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 830
    • Issues 830
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 234
    • Merge requests 234
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • VTKVTK
  • VTKVTK
  • Issues
  • #17908
Closed
Open
Issue created May 24, 2020 by Frederic De Pourcq@fdepourcqDeveloper

vtkOpenGLContextDevice3D & alpha blending

In vtk 8.2 I got alpha blending to work fairly easy in vtkPlotSurface by specifying 4 colorcomponents. This does not work anymore in trunk. It seems vtkOpenGLContextDevice3D never enables alpha blending.

These last 2 lines added to vtkOpenGLContextDevice3D::EnableDepthBuffer seem to be a "fix":

void vtkOpenGLContextDevice3D::EnableDepthBuffer()
{
  vtkOpenGLState* ostate = this->RenderWindow->GetState();
  ostate->vtkglEnable(GL_DEPTH_TEST);

  ostate->vtkglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
  ostate->vtkglEnable(GL_BLEND);
}

I don't know if this is the proper solution (at the minimum it requires a separate function), but maybe someone who knows the code can have a look at this?

EDIT: this seems to only happen when using QVTKOpenGLNativeWidget

Edited May 26, 2020 by Frederic De Pourcq
Assignee
Assign to
Time tracking