diff --git a/include/shaders.h b/include/shaders.h index cfd2615..7d667ad 100644 --- a/include/shaders.h +++ b/include/shaders.h @@ -99,8 +99,8 @@ const char * particleVertexShader = "#version 330 core\n" " vec4 pos = proj*vec4(a_offset.xy,0.0,1.0);\n" " gl_Position = vec4(a_position.xy+pos.xy,0.0,1.0);\n" " gl_PointSize = a_offset.w*scale*zoom;\n" - "if (tracked == gl_InstanceID){o_colour = vec4(0.0,0.0,1.0,1.0);}" - "else{ o_colour = vec4(1.0,0.0,0.0,1.0); }\n" + "if (tracked == gl_InstanceID){o_colour = vec4(1.0,0.0,0.0,1.0);}" + "else{ o_colour = vec4(0.5,0.5,1.0,1.0); }\n" "}"; const char * particleFragmentShader = "#version 330 core\n" "in vec4 o_colour; out vec4 colour;\n" diff --git a/src/main.cpp b/src/main.cpp index f80e45b..3a5b951 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -189,7 +189,7 @@ int main(){ while (window.pollEvent(event)){ if (event.type == sf::Event::Closed){ - record.save(); + if ( isRecording ){record.save();} window.close(); } @@ -211,7 +211,7 @@ int main(){ } if (event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape){ - record.save(); + if ( isRecording ){record.save();} window.close(); }