a quickfix in the morning

This commit is contained in:
j3d1 2016-10-06 03:30:09 +02:00
parent 70b0fee526
commit 03a271c731
8 changed files with 64 additions and 54 deletions

View file

@ -574,7 +574,7 @@ void RendererPolygon3d::renderMissiles() {
glm::mat4 model = computeModelMatrix(ship);
glUniformMatrix4fv(m_shader_game_objects.location("model"), 1, GL_FALSE, glm::value_ptr(model));
glm::vec3 c = glm::vec3(0.1, 1.0, 0.2);
glm::vec3 c = ship->color;
glUniform3f(m_shader_game_objects.location("materialColor"), c.x, c.y, c.z);
m_shipModel->render();
@ -673,7 +673,8 @@ void RendererPolygon3d::renderMissiles() {
fade_out = 1.0 - (trace->age / trace->maxAge);
}
glColor3f(0.0, 0.5*fade_out, 0.5*fade_out);
glLineWidth(3);
glColor4f(trace->player->color.x, trace->player->color.y, trace->player->color.z, fade_out);
glBegin(GL_LINE_STRIP);
for (const game::Trace::TracePoint &tp : trace->points) {
glVertex2f(tp.position.x, tp.position.y);