Changeset 06d959f in opengl-game for graphics-pipeline_vulkan.hpp


Ignore:
Timestamp:
Nov 27, 2019, 5:19:23 PM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
e1308e8
Parents:
0cf1a23
Message:

Add an addVertexNormals method to VulkanGame that calculates the normals given a list of vertices

File:
1 edited

Legend:

Unmodified
Added
Removed
  • graphics-pipeline_vulkan.hpp

    r0cf1a23 r06d959f  
    1111
    1212#include "vulkan-utils.hpp"
    13 
    14 using namespace std;
    1513
    1614// TODO: Maybe change the name of this struct so I can call the list something other than descriptorInfoList
     
    5755
    5856      const vector<SceneObject<VertexType>>& getObjects();
    59       bool addObject(const vector<VertexType>& vertices, vector<uint16_t> indices, VkCommandPool commandPool,
     57      void addObject(const vector<VertexType>& vertices, vector<uint16_t> indices, VkCommandPool commandPool,
    6058         VkQueue graphicsQueue);
    6159
     
    413411
    414412template<class VertexType>
    415 bool GraphicsPipeline_Vulkan<VertexType>::addObject(const vector<VertexType>& vertices, vector<uint16_t> indices,
     413void GraphicsPipeline_Vulkan<VertexType>::addObject(const vector<VertexType>& vertices, vector<uint16_t> indices,
    416414      VkCommandPool commandPool, VkQueue graphicsQueue) {
    417415
     
    426424      idx += numVertices;
    427425   }
    428    objects.push_back({vertices, indices });
     426   objects.push_back({ vertices, indices });
    429427
    430428   VulkanUtils::copyDataToBuffer(device, physicalDevice, commandPool, vertices, vertexBuffer, numVertices,
     
    435433      graphicsQueue);
    436434   numIndices += indices.size();
    437 
    438    return true;
    439435}
    440436
Note: See TracChangeset for help on using the changeset viewer.