Changeset 3d96d13 in opengl-game


Ignore:
Timestamp:
Oct 24, 2018, 2:45:42 AM (6 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
e1eec78
Parents:
1e3dddf (diff), 446e55d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of medievaltech.com:opengl-game

File:
1 edited

Legend:

Unmodified
Added
Removed
  • new-game.cpp

    r1e3dddf r3d96d13  
    265265   glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
    266266   glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
     267#else
     268   glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
     269   glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    267270#endif
    268271
     
    270273   GLFWmonitor* mon = NULL;
    271274
    272    glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
    273    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
    274275   glfwWindowHint(GLFW_SAMPLES, 16);
    275276   glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, true);
     
    300301      glDebugMessageCallback((GLDEBUGPROC)debugGlCallback, nullptr);
    301302      cout << "Bound debug callback" << endl;
     303   } else {
     304     cout << "OpenGL debugg message callback is not supported" << endl;
    302305   }
    303306
     
    796799
    797800         // this code moves the asteroids
    798          for (int i = 0; i < objects.size(); i++) {
     801         for (unsigned int i = 0; i < objects.size(); i++) {
    799802            if (objects[i]->type == TYPE_ASTEROID && !objects[i]->deleted) {
    800803               transformObject(*objects[i], translate(mat4(1.0f), vec3(0.0f, 0.0f, 0.04f)), ubo);
     
    12441247
    12451248   obj->normals.reserve(obj->points.size());
    1246    for (int i = 0; i < obj->points.size(); i += 9) {
     1249   for (unsigned int i = 0; i < obj->points.size(); i += 9) {
    12471250      vec3 point1 = vec3(obj->points[i], obj->points[i + 1], obj->points[i + 2]);
    12481251      vec3 point2 = vec3(obj->points[i + 3], obj->points[i + 4], obj->points[i + 5]);
     
    13321335
    13331336   // start from the second point
    1334    for (int i = 3; i < obj->points.size(); i += 3) {
     1337   for (unsigned int i = 3; i < obj->points.size(); i += 3) {
    13351338      if (min_x > obj->points[i]) {
    13361339         min_x = obj->points[i];
     
    13691372      obj->bounding_radius = radius_z;
    13701373
    1371    for (int i = 0; i < obj->points.size(); i += 3) {
     1374   for (unsigned int i = 0; i < obj->points.size(); i += 3) {
    13721375      obj->points[i] -= obj->bounding_center.x;
    13731376      obj->points[i + 1] -= obj->bounding_center.y;
     
    20242027
    20252028   glBindBuffer(GL_ARRAY_BUFFER, model_mat_idx_vbo);
    2026    for (int i = 0; i < obj.num_points; i++) {
     2029   for (unsigned int i = 0; i < obj.num_points; i++) {
    20272030      glBufferSubData(GL_ARRAY_BUFFER, (obj.vertex_vbo_offset + i) * sizeof(GLuint), sizeof(GLuint), &obj.ubo_offset);
    20282031   }
     
    20702073   // TODO: A lot of the values calculated here can be calculated once and saved when the laser is created,
    20712074   // and then re-used here
    2072 
    2073    mat4 new_model_transform = translate(mat4(1.0f), translation) * laser->model_transform;
    20742075
    20752076   vec3 start = vec3(laser->model_transform * vec4(0.0f, 0.0f, 0.0f, 1.0f));
     
    22972298         ImGuiWindowFlags_NoResize |
    22982299         ImGuiWindowFlags_NoMove);
     2300<<<<<<< HEAD
    22992301      ImGui::Text(ssScore.str().c_str());
    23002302      ImGui::Text(ssFps.str().c_str());
     2303=======
     2304      ImGui::Text("Score: ???");
     2305      ImGui::Text("FPS:   %f", fps);
     2306>>>>>>> 446e55df316c547047dc0eb5c46189c6958dba21
    23012307      ImGui::End();
    23022308   }
Note: See TracChangeset for help on using the changeset viewer.