Changeset 683dd55 in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Nov 22, 2019, 4:47:52 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
8e02b6b
Parents:
1908591
Message:

Add a getObjects() method to the GraphicsPipeline_Vulkan class that returns a reference to the list of objects added to the pipeline, and use that method instead of the numPlanes variable to keep track of the number of textured planes. Also, update the shader compilation batch file and add header files as dependencies to the vulkangame target in the makefile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r1908591 r683dd55  
    248248   cout << "Created all the graphics pipelines" << endl;
    249249
    250    numPlanes = 2;
    251 
    252250   createCommandBuffers();
    253251
     
    255253}
    256254
     255// TODO: Maybe changes the name to initScene() or something similar
    257256void VulkanGame::initMatrices() {
    258257   cam_pos = vec3(0.0f, 0.0f, 2.0f);
     
    299298               } else if (e.key.keycode == SDL_SCANCODE_SPACE) {
    300299                  cout << "Adding a plane" << endl;
    301                   float zOffset = -2.0f + (0.5f * numPlanes);
     300                  float zOffset = -2.0f + (0.5f * modelPipeline.getObjects().size());
    302301
    303302                  vkDeviceWaitIdle(device);
     
    314313
    315314                  createCommandBuffers();
    316 
    317                   numPlanes++;
    318315               } else {
    319316                  cout << "Key event detected" << endl;
Note: See TracChangeset for help on using the changeset viewer.