Changeset 44f23af in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Feb 25, 2020, 9:29:36 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
0807aeb
Parents:
3b84bb6
Message:

In VulkanGame, add code to resize the storage buffer and update the right descriptor info when the storage buffer becomes full

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r3b84bb6 r44f23af  
    742742      if (gui->keyPressed(SDL_SCANCODE_X)) {
    743743         if (asteroidObjects.size() > 0 && !asteroidObjects[0].ssbo.deleted) {
     744            asteroidObjects[0].model_transform = translate(mat4(1.0f), vec3(0.0f, 0.0f, asteroidSpeed * elapsedTime))
     745               * asteroidObjects[0].model_transform;
     746
     747            vec3 obj_center = vec3(asteroid_VP_mats.view * vec4(asteroidObjects[0].center, 1.0f));
     748
     749            float closest = obj_center.z - asteroidObjects[0].radius;
     750            cout << closest << " ? " << -NEAR_CLIP << endl;
     751
    744752            updateObject(asteroidObjects, asteroidPipeline, 0);
    745753         }
Note: See TracChangeset for help on using the changeset viewer.