Changeset cd487fb in opengl-game
- 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)
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
TODO.txt
re3bef3a rcd487fb 18 18 -Maybe separate out the camera controls 19 19 -Turn the game into more of an overhead view RTS where you can use the mouse to select and move ships 20 21 Apparently a new pipeline is required for every type of shader22 However, it seems like I should only need one swap chain23 Seems like I'll have to create a new set of framebuffers and a new set of command buffers as well24 25 I will definitely have to create new command buffers, since that's where I specify the vertex buffers and26 index buffer for the draw operation27 28 We'll need to have a separate command buffer for every framebuffer in the swapchain29 30 Actually, I could probably just have multiple vkCmdDraw calls in each command buffer and rebind to a different31 pipeline between each one -
graphics-pipeline_vulkan.cpp
re3bef3a rcd487fb 3 3 #include <fstream> 4 4 #include <stdexcept> 5 #include <iostream>6 5 7 6 using namespace std; 8 9 // TODO: Remove any instances of cout and instead throw exceptions10 7 11 8 GraphicsPipeline_Vulkan::GraphicsPipeline_Vulkan(VkPhysicalDevice physicalDevice, VkDevice device, … … 315 312 break; 316 313 default: 317 cout << "Unknown descriptor type: " << descriptorWrites[j].descriptorType << endl;314 throw runtime_error("Unknown descriptor type: " + to_string(descriptorWrites[j].descriptorType)); 318 315 } 319 316 } -
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; -
vulkan-game.cpp
re3bef3a rcd487fb 165 165 return RTWO_ERROR; 166 166 } 167 168 SDL_SetRenderTarget(renderer, uiOverlay); 167 169 168 170 return RTWO_SUCCESS; … … 333 335 334 336 void VulkanGame::renderUI() { 335 // TODO: Since I currently don't use any other render targets,336 // I may as well set this once before the render loop337 SDL_SetRenderTarget(renderer, uiOverlay);338 339 337 SDL_SetRenderDrawColor(renderer, 0x00, 0x00, 0x00, 0x00); 340 338 SDL_RenderClear(renderer); -
vulkan-ref.cpp
re3bef3a rcd487fb 1716 1716 1717 1717 void mainLoop() { 1718 // TODO: Create some generic event-handling functions in game-gui -*1718 // TODO: Create some generic event-handling functions in game-gui 1719 1719 SDL_Event e; 1720 1720 bool quit = false;
Note:
See TracChangeset
for help on using the changeset viewer.