| 507 | } |
| 508 | |
| 509 | void vtkOpenGLContextDevice2D::ReadyVCBOProgram() |
| 510 | { |
| 511 | vtkOpenGLGL2PSHelper* gl2ps = PrepProgramForGL2PS(*this->VCBO); |
| 512 | |
| 513 | if (!this->VCBO->Program) |
| 514 | { |
| 515 | vtkTransformFeedback* tf = nullptr; |
| 516 | if (gl2ps && gl2ps->GetActiveState() == vtkOpenGLGL2PSHelper::Capture) |
| 517 | { |
| 518 | tf = vtkTransformFeedback::New(); |
| 519 | tf->AddVarying(vtkTransformFeedback::Vertex_ClipCoordinate_F, "gl_Position"); |
| 520 | tf->AddVarying(vtkTransformFeedback::Color_RGBA_F, "vertexColor"); |
| 521 | } |
| 522 | std::string vs = "//VTK::System::Dec\n#define haveColors\n"; |
| 523 | vs += myVertShader; |
| 524 | std::string fs = "//VTK::System::Dec\n#define haveColors\n"; |
| 525 | fs += myFragShader; |
| 526 | this->VCBO->Program = |
| 527 | this->RenderWindow->GetShaderCache()->ReadyShaderProgram(vs.c_str(), fs.c_str(), "", tf); |
| 528 | if (tf) |
| 529 | { |
| 530 | tf->Delete(); |
| 531 | tf = nullptr; |
| 532 | } |
| 533 | } |
| 534 | else |
| 535 | { |
| 536 | this->RenderWindow->GetShaderCache()->ReadyShaderProgram(this->VCBO->Program); |
| 537 | } |
| 538 | } |
| 539 | |
| 540 | void vtkOpenGLContextDevice2D::ReadyLinesBOProgram() |
| 541 | { |
no test coverage detected