Changeset cd487fb in opengl-game for graphics-pipeline_vulkan.hpp
- Timestamp:
- Nov 12, 2019, 9:48:50 PM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- b8777b7
- Parents:
- e3bef3a
- git-author:
- Dmitry Portnoy <dmitry.portnoy@…> (11/12/19 21:25:58)
- git-committer:
- Dmitry Portnoy <dmitry.portnoy@…> (11/12/19 21:48:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
graphics-pipeline_vulkan.hpp
re3bef3a rcd487fb 4 4 #include "graphics-pipeline.hpp" 5 5 6 #include < iostream>6 #include <stdexcept> 7 7 #include <vector> 8 8 … … 12 12 13 13 using namespace std; 14 15 // TODO: Remove any instances of cout and instead throw exceptions16 14 17 15 // TODO: Maybe change the name of this struct so I can call the list something other than descriptorInfoList … … 113 111 bool GraphicsPipeline_Vulkan::addObject(const vector<VertexType>& vertices, vector<uint16_t>& indices, 114 112 VkCommandPool commandPool, VkQueue graphicsQueue) { 115 cout << "Adding object to pipeline..." << endl;116 113 117 114 if (numVertices + vertices.size() > vertexCapacity) { 118 cout << "ERROR: Need to resize vertex buffers" << endl;115 throw runtime_error("ERROR: Need to resize vertex buffers"); 119 116 } else if (numIndices + indices.size() > indexCapacity) { 120 cout << "ERROR: Need to resize index buffers" << endl;117 throw runtime_error("ERROR: Need to resize index buffers"); 121 118 } else { 122 cout << "Added object to scene" << endl;123 124 119 for (uint16_t& idx : indices) { 125 120 idx += numVertices;
Note:
See TracChangeset
for help on using the changeset viewer.