| 851 | } |
| 852 | |
| 853 | void DebugDrawWire::DrawVertColor() { |
| 854 | Graphics *graphics = Graphics::Instance(); |
| 855 | Shaders *shaders = Shaders::Instance(); |
| 856 | Camera *cam = ActiveCameras::Get(); |
| 857 | |
| 858 | graphics->SetLineWidth(1); |
| 859 | |
| 860 | int shader_id = shaders->returnProgram("3d_color #COLOR_ATTRIB #NO_VELOCITY_BUF"); |
| 861 | shaders->setProgram(shader_id); |
| 862 | int vert_attrib_id = shaders->returnShaderAttrib("vert_attrib", shader_id); |
| 863 | int color_attrib_id = shaders->returnShaderAttrib("color_attrib", shader_id); |
| 864 | shaders->SetUniformMat4("mvp", cam->GetProjMatrix() * cam->GetViewMatrix() * transform); |
| 865 | shaders->SetUniformFloat("opacity", opacity * (1.0f - fade_amount)); |
| 866 | |
| 867 | graphics->EnableVertexAttribArray(vert_attrib_id); |
| 868 | graphics->EnableVertexAttribArray(color_attrib_id); |
| 869 | |
| 870 | vbo->Bind(); |
| 871 | glVertexAttribPointer(vert_attrib_id, 3, GL_FLOAT, false, sizeof(float) * 7, (const void *)0); |
| 872 | glVertexAttribPointer(color_attrib_id, 4, GL_FLOAT, false, sizeof(float) * 7, (const void *)(sizeof(float) * 3)); |
| 873 | |
| 874 | graphics->DrawArrays(GL_LINES, 0, vbo->size() / sizeof(float) / 7); |
| 875 | |
| 876 | graphics->ResetVertexAttribArrays(); |
| 877 | } |
| 878 | |
| 879 | DebugDrawStippleMesh::DebugDrawStippleMesh(const RC_VBOContainer &_vbo, |
| 880 | const mat4 &_transform, |
nothing calls this directly
no test coverage detected