Skip to content

Commit

Permalink
shader colour change, save on close if recording
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Sep 15, 2022
1 parent c13ab92 commit b77c9f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/shaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ int main(){
while (window.pollEvent(event)){

if (event.type == sf::Event::Closed){
record.save();
if ( isRecording ){record.save();}
window.close();
}

Expand All @@ -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();
}

Expand Down

0 comments on commit b77c9f4

Please sign in to comment.