| 445 | } |
| 446 | |
| 447 | void Arrow3d::RenderArrow(ref_ptr<dp::GraphicsContext> context, ref_ptr<gpu::ProgramManager> mng, dp::MeshObject & mesh, |
| 448 | ScreenBase const & screen, gpu::Program program, dp::Color const & color, float dz, |
| 449 | float scaleFactor) |
| 450 | { |
| 451 | gpu::Arrow3dProgramParams params; |
| 452 | auto [transform, normalTransform] = CalculateTransform(screen, dz, scaleFactor, context->GetApiVersion()); |
| 453 | params.m_transform = std::move(transform); |
| 454 | params.m_normalTransform = std::move(normalTransform); |
| 455 | params.m_color = glsl::ToVec4(color); |
| 456 | params.m_texCoordFlipping = m_texCoordFlipping; |
| 457 | |
| 458 | auto gpuProgram = mng->GetProgram(program); |
| 459 | mesh.Render(context, gpuProgram, m_state, mng->GetParamsSetter(), params); |
| 460 | } |
| 461 | |
| 462 | std::pair<glsl::mat4, glsl::mat4> Arrow3d::CalculateTransform(ScreenBase const & screen, float dz, float scaleFactor, |
| 463 | dp::ApiVersion apiVersion) const |
nothing calls this directly
no test coverage detected