MCPcopy Create free account
hub / github.com/Kitware/VTK / ReadyVBOProgram

Method ReadyVBOProgram

Rendering/ContextOpenGL2/vtkOpenGLContextDevice2D.cxx:479–507  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

477
478//------------------------------------------------------------------------------
479void vtkOpenGLContextDevice2D::ReadyVBOProgram()
480{
481 vtkOpenGLGL2PSHelper* gl2ps = PrepProgramForGL2PS(*this->VBO);
482
483 if (!this->VBO->Program)
484 {
485 vtkTransformFeedback* tf = nullptr;
486 if (gl2ps && gl2ps->GetActiveState() == vtkOpenGLGL2PSHelper::Capture)
487 {
488 tf = vtkTransformFeedback::New();
489 tf->AddVarying(vtkTransformFeedback::Vertex_ClipCoordinate_F, "gl_Position");
490 }
491 std::string vs = "//VTK::System::Dec\n";
492 vs += myVertShader;
493 std::string fs = "//VTK::System::Dec\n";
494 fs += myFragShader;
495 this->VBO->Program =
496 this->RenderWindow->GetShaderCache()->ReadyShaderProgram(vs.c_str(), fs.c_str(), "", tf);
497 if (tf)
498 {
499 tf->Delete();
500 tf = nullptr;
501 }
502 }
503 else
504 {
505 this->RenderWindow->GetShaderCache()->ReadyShaderProgram(this->VBO->Program);
506 }
507}
508
509void vtkOpenGLContextDevice2D::ReadyVCBOProgram()
510{

Callers 2

DrawPointsMethod · 0.95
CoreDrawTrianglesMethod · 0.95

Calls 7

PrepProgramForGL2PSFunction · 0.85
AddVaryingMethod · 0.80
GetShaderCacheMethod · 0.80
DeleteMethod · 0.65
NewFunction · 0.50
ReadyShaderProgramMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected