Changeset 2b0214c in opengl-game for new-game.cpp
- Timestamp:
- Oct 5, 2018, 1:07:44 AM (6 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 0e0f851
- Parents:
- 1f3d32b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
new-game.cpp
r1f3d32b r2b0214c 458 458 glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, 0); 459 459 460 // Comment these two lines out when I want to use selected colors 461 glBindBuffer(GL_ARRAY_BUFFER, colors_vbo); 462 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0); 463 460 464 glBindBuffer(GL_ARRAY_BUFFER, normals_vbo); 461 465 glVertexAttribPointer(2, 3, GL_FLOAT, GL_FALSE, 0, 0); … … 734 738 735 739 if ((obj_center.z - objects[i]->bounding_radius) > -NEAR_CLIP) { 740 removeObjectFromScene(*objects[i], ubo); 741 } 742 if (((Asteroid*)objects[i])->hp <= 0) { 736 743 removeObjectFromScene(*objects[i], ubo); 737 744 } … … 1951 1958 1952 1959 if (closestAsteroid != NULL) { 1953 eot = new EffectOverTime(closestAsteroid->hp, - 5, closestAsteroid);1960 eot = new EffectOverTime(closestAsteroid->hp, -10, closestAsteroid); 1954 1961 effects.push_back(eot); 1955 1962 } … … 2036 2043 glBindVertexArray(color_vao); 2037 2044 2045 /* 2038 2046 if (selectedObject != NULL) { 2039 2047 glBindBuffer(GL_ARRAY_BUFFER, selected_colors_vbo); … … 2042 2050 glDrawArrays(GL_TRIANGLES, selectedObject->vertex_vbo_offset, selectedObject->num_points); 2043 2051 } 2044 2045 glBindBuffer(GL_ARRAY_BUFFER, colors_vbo); 2046 glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0); 2052 */ 2053 2054 // Uncomment this code when I want to use selected colors again 2055 // glBindBuffer(GL_ARRAY_BUFFER, colors_vbo); 2056 // glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 0, 0); 2047 2057 2048 2058 glDrawArrays(GL_TRIANGLES, shaderBufferInfo[color_sp].vbo_base, shaderBufferInfo[color_sp].vbo_offset);
Note:
See TracChangeset
for help on using the changeset viewer.