Changeset 2b40f48 in opengl-game for vulkan-game.hpp


Ignore:
Timestamp:
Dec 5, 2019, 5:48:59 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
7c929fc
Parents:
785333b (diff), cf727ca (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into hotfix/ship-shader-lights

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vulkan-game.hpp

    r785333b r2b40f48  
    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.