Changeset adb104f in opengl-game for new-game.cpp
- Timestamp:
- Jan 10, 2019, 4:38:01 AM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 8fbd34f
- Parents:
- db06984
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
rdb06984 radb104f 618 618 GLuint laser_sp_models_ub_index = glGetUniformBlockIndex(laser_sp, "models"); 619 619 620 GLuint elapsed_system_time_loc = glGetUniformLocation(explosion_sp, "elapsed_system_time"); 620 GLuint explosion_start_time_loc = glGetUniformLocation(explosion_sp, "explosion_start_time"); 621 GLuint cur_time_loc = glGetUniformLocation(explosion_sp, "cur_time"); 621 622 622 623 … … 820 821 removeObjectFromScene(*objects[i], ubo); 821 822 score++; 823 824 // render an explosion 825 glUseProgram(explosion_sp); 826 glUniform1f(explosion_start_time_loc, (GLfloat)glfwGetTime()); 827 cout << "REMOVED" << endl; 828 cout << i << endl; 822 829 } 823 830 } … … 915 922 916 923 glUseProgram(explosion_sp); 917 glUniform1f( elapsed_system_time_loc, (GLfloat)current_seconds);924 glUniform1f(cur_time_loc, (GLfloat)current_seconds); 918 925 919 926 // Render scene … … 1907 1914 t_accum += 0.01f; 1908 1915 1909 float randx = ((float)rand() / (float)RAND_MAX) * 1.0f- 0.5f;1910 float rand z = ((float)rand() / (float)RAND_MAX) * 1.0f- 0.5f;1916 float randx = ((float)rand() / (float)RAND_MAX) - 0.5f; 1917 float randy = ((float)rand() / (float)RAND_MAX) - 0.5f; 1911 1918 vv[i*3] = randx; 1912 vv[i*3 + 1] = 1.0f;1913 vv[i*3 + 2] = randz;1919 vv[i*3 + 1] = randy; 1920 vv[i*3 + 2] = 0.0f; 1914 1921 } 1915 1922
Note:
See TracChangeset
for help on using the changeset viewer.