| 827 | } |
| 828 | |
| 829 | void DebugDrawWire::DrawVert() { |
| 830 | Graphics *graphics = Graphics::Instance(); |
| 831 | Shaders *shaders = Shaders::Instance(); |
| 832 | Camera *cam = ActiveCameras::Get(); |
| 833 | |
| 834 | graphics->SetLineWidth(1); |
| 835 | |
| 836 | int shader_id = shaders->returnProgram("3d_color #COLOR_UNIFORM #NO_VELOCITY_BUF"); |
| 837 | shaders->setProgram(shader_id); |
| 838 | int vert_attrib_id = shaders->returnShaderAttrib("vert_attrib", shader_id); |
| 839 | shaders->SetUniformMat4("mvp", cam->GetProjMatrix() * cam->GetViewMatrix() * transform); |
| 840 | shaders->SetUniformVec4("color_uniform", color); |
| 841 | shaders->SetUniformFloat("opacity", opacity * (1.0f - fade_amount)); |
| 842 | |
| 843 | graphics->EnableVertexAttribArray(vert_attrib_id); |
| 844 | |
| 845 | vbo->Bind(); |
| 846 | glVertexAttribPointer(vert_attrib_id, 3, GL_FLOAT, false, sizeof(float) * 3, (const void *)0); |
| 847 | |
| 848 | graphics->DrawArrays(GL_LINES, 0, vbo->size() / sizeof(float) / 3); |
| 849 | |
| 850 | graphics->ResetVertexAttribArrays(); |
| 851 | } |
| 852 | |
| 853 | void DebugDrawWire::DrawVertColor() { |
| 854 | Graphics *graphics = Graphics::Instance(); |
nothing calls this directly
no test coverage detected