Skip to content

Commit

Permalink
Always set our default opengl blend func
Browse files Browse the repository at this point in the history
Some classes rely on this setting but do not set
it themselves.
  • Loading branch information
martinken committed May 26, 2020
1 parent 26daabc commit eeb5cf5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Rendering/OpenGL2/vtkOpenGLRenderWindow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1071,6 +1071,11 @@ void vtkOpenGLRenderWindow::Start()
this->GetState()->Initialize(this);
}

// default to our standard alpha blend eqn, some vtk classes rely on this
// and do not set it themselves
this->GetState()->vtkglBlendFuncSeparate(
GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_ONE, GL_ONE_MINUS_SRC_ALPHA);

// creates or resizes the framebuffer
this->Size[0] = (this->Size[0] > 0 ? this->Size[0] : 300);
this->Size[1] = (this->Size[1] > 0 ? this->Size[1] : 300);
Expand Down

0 comments on commit eeb5cf5

Please sign in to comment.