Changeset a79be34 in opengl-game for vulkan-game.cpp


Ignore:
Timestamp:
Dec 19, 2019, 4:37:03 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
cd1cb0f
Parents:
60578ce
Message:

Finish copying the ship pipeline to VulkanGame

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.cpp

    r60578ce ra79be34  
    267267   // TODO: With the normals, indexing basically becomes pointless since no vertices will have exactly
    268268   // the same data. Add an option to make some pipelines not use indexing
    269    /*
    270269   shipPipeline.addObject(
     270      centerObject<ShipVertex>(
    271271      addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
    272272      addVertexNormals<ShipVertex>({
     
    466466         {{  1.5f,   0.0f,   0.0f}, {0.0f, 0.0f, 0.3f}},
    467467         {{  1.3f,   0.0f,  -0.3f}, {0.0f, 0.0f, 0.3f}},
    468       })), {
     468      }))), {
    469469           0,   1,   2,   3,   4,   5,
    470470           6,   7,   8,   9,  10,  11,
     
    497497         135, 136, 137,
    498498      }, commandPool, graphicsQueue);
    499    */
    500 
    501    // z-range is 0 to 1, with +1 pointing into the screen
    502    shipPipeline.addObject(
    503       addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
    504       addVertexNormals<ShipVertex>({
    505          {{  40.0f,   40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
    506          {{ -40.0f,   40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
    507          {{ -40.0f,  -40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
    508          {{  40.0f,   40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
    509          {{ -40.0f,  -40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
    510          {{  40.0f,  -40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
    511 
    512          {{   8.0f,    8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
    513          {{  -8.0f,    8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
    514          {{  -8.0f,   -8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
    515          {{   8.0f,    8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
    516          {{  -8.0f,   -8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
    517          {{   8.0f,   -8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
    518       })), {
    519          0,   1,   2,   3,   4,   5,
    520          6,   7,   8,   9,   10,   11,
    521       }, commandPool, graphicsQueue);
    522499
    523500   shipPipeline.createDescriptorSetLayout();
     
    549526
    550527   float cam_yaw = 0.0f;
    551    float cam_pitch = 0.0f; // -50.0f;
     528   float cam_pitch = -50.0f;
    552529
    553530   mat4 yaw_mat = rotate(mat4(1.0f), radians(-cam_yaw), vec3(0.0f, 1.0f, 0.0f));
Note: See TracChangeset for help on using the changeset viewer.