Render the sphere at the correct position and with the correct orientation
| 41 | |
| 42 | // Render the sphere at the correct position and with the correct orientation |
| 43 | void Line::render(openglframework::Shader& shader, const openglframework::Matrix4& worldToCameraMatrix) { |
| 44 | |
| 45 | // Bind the shader |
| 46 | shader.bind(); |
| 47 | |
| 48 | // Set the model to camera matrix |
| 49 | shader.setMatrix4x4Uniform("localToWorldMatrix", openglframework::Matrix4::identity()); |
| 50 | shader.setMatrix4x4Uniform("worldToCameraMatrix", worldToCameraMatrix); |
| 51 | |
| 52 | // Set the vertex color |
| 53 | openglframework::Vector4 color(1, 0, 0, 1); |
| 54 | shader.setIntUniform("isGlobalVertexColorEnabled", 1, false); |
| 55 | shader.setVector4Uniform("globalVertexColor", color, false); |
| 56 | |
| 57 | /* |
| 58 | glBegin(GL_LINES); |
| 59 | glVertex3f(mWorldPoint1.x, mWorldPoint1.y, mWorldPoint1.z); |
| 60 | glVertex3f(mWorldPoint2.x, mWorldPoint2.y, mWorldPoint2.z); |
| 61 | glEnd(); |
| 62 | */ |
| 63 | |
| 64 | // Unbind the shader |
| 65 | shader.unbind(); |
| 66 | } |
nothing calls this directly
no test coverage detected