Changes in vulkan-game.hpp [055750a:cf727ca] in opengl-game


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r055750a rcf727ca  
    3333   vec3 color;
    3434   vec3 normal;
     35   unsigned int objIndex;
    3536};
    3637
     
    178179      vector<VertexType> addVertexNormals(vector<VertexType> vertices);
    179180
     181      template<class VertexType>
     182      vector<VertexType> addObjectIndex(unsigned int objIndex, vector<VertexType> vertices);
     183
    180184      void createBufferSet(VkDeviceSize bufferSize, VkBufferUsageFlags flags,
    181185         vector<VkBuffer>& buffers, vector<VkDeviceMemory>& buffersMemory, vector<VkDescriptorBufferInfo>& bufferInfoList);
     
    211215}
    212216
     217template<class VertexType>
     218vector<VertexType> VulkanGame::addObjectIndex(unsigned int objIndex, vector<VertexType> vertices) {
     219   for (VertexType& vertex : vertices) {
     220      vertex.objIndex = objIndex;
     221   }
     222
     223   return vertices;
     224}
     225
    213226#endif // _VULKAN_GAME_H
Note: See TracChangeset for help on using the changeset viewer.