| 568 | } |
| 569 | |
| 570 | void vtkOpenGLContextDevice2D::ReadyLinesCBOProgram() |
| 571 | { |
| 572 | vtkOpenGLGL2PSHelper* gl2ps = PrepProgramForGL2PS(*this->LinesCBO); |
| 573 | |
| 574 | if (!this->LinesCBO->Program) |
| 575 | { |
| 576 | vtkTransformFeedback* tf = nullptr; |
| 577 | if (gl2ps && gl2ps->GetActiveState() == vtkOpenGLGL2PSHelper::Capture) |
| 578 | { |
| 579 | tf = vtkTransformFeedback::New(); |
| 580 | tf->AddVarying(vtkTransformFeedback::Vertex_ClipCoordinate_F, "gl_Position"); |
| 581 | tf->AddVarying(vtkTransformFeedback::Color_RGBA_F, "vertexColor"); |
| 582 | } |
| 583 | std::string vs = "//VTK::System::Dec\n#define haveColors\n#define haveLines\n"; |
| 584 | vs += myVertShader; |
| 585 | std::string fs = "//VTK::System::Dec\n#define haveColors\n#define haveLines\n"; |
| 586 | fs += myFragShader; |
| 587 | this->LinesCBO->Program = |
| 588 | this->RenderWindow->GetShaderCache()->ReadyShaderProgram(vs.c_str(), fs.c_str(), "", tf); |
| 589 | if (tf) |
| 590 | { |
| 591 | tf->Delete(); |
| 592 | tf = nullptr; |
| 593 | } |
| 594 | } |
| 595 | else |
| 596 | { |
| 597 | this->RenderWindow->GetShaderCache()->ReadyShaderProgram(this->LinesCBO->Program); |
| 598 | } |
| 599 | } |
| 600 | |
| 601 | void vtkOpenGLContextDevice2D::ReadyVTBOProgram() |
| 602 | { |
no test coverage detected