Changeset 683dd55 in opengl-game
- Timestamp:
- Nov 22, 2019, 4:47:52 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 8e02b6b
- Parents:
- 1908591
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
compile.bat
r1908591 r683dd55 1 1 echo off 2 2 setlocal enabledelayedexpansion 3 4 cd shaders 3 5 4 6 set VULKAN_SDK_PATH=D:\VulkanSDK\1.1.108.0 … … 10 12 %VULKAN_SDK_PATH%\Bin\glslangValidator.exe -V %%f -o %%~nf-!ext!.spv 11 13 ) 14 15 cd .. -
graphics-pipeline_vulkan.hpp
r1908591 r683dd55 56 56 void createRenderCommands(VkCommandBuffer& commandBuffer, uint32_t currentImage); 57 57 58 const vector<SceneObject<VertexType>>& getObjects(); 58 59 bool addObject(const vector<VertexType>& vertices, vector<uint16_t> indices, VkCommandPool commandPool, 59 60 VkQueue graphicsQueue); … … 104 105 } 105 106 107 // TODO: Verify that vertex capacity and index capacity are both > 0 106 108 template<class VertexType> 107 109 GraphicsPipeline_Vulkan<VertexType>::GraphicsPipeline_Vulkan(VkPhysicalDevice physicalDevice, VkDevice device, … … 406 408 407 409 template<class VertexType> 410 const vector<SceneObject<VertexType>>& GraphicsPipeline_Vulkan<VertexType>::getObjects() { 411 return objects; 412 } 413 414 template<class VertexType> 408 415 bool GraphicsPipeline_Vulkan<VertexType>::addObject(const vector<VertexType>& vertices, vector<uint16_t> indices, 409 416 VkCommandPool commandPool, VkQueue graphicsQueue) { -
makefile
r1908591 r683dd55 59 59 $(CC) $(CXX_FLAGS) -o $@ $^ $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN 60 60 61 vulkangame: main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp game-gui-sdl.cpp 62 $(CC) $(CXX_FLAGS) -o $@ $^ $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN 61 SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp game-gui-sdl.cpp 62 HEADER_FILES = vulkan-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp game-gui-sdl.hpp game-gui.hpp graphics-pipeline_vulkan.hpp 63 64 vulkangame: $(SRC_FILES) $(HEADER_FILES) 65 $(CC) $(CXX_FLAGS) -o $@ $(SRC_FILES) $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN 63 66 64 67 .PHONY: shaders -
vulkan-game.cpp
r1908591 r683dd55 248 248 cout << "Created all the graphics pipelines" << endl; 249 249 250 numPlanes = 2;251 252 250 createCommandBuffers(); 253 251 … … 255 253 } 256 254 255 // TODO: Maybe changes the name to initScene() or something similar 257 256 void VulkanGame::initMatrices() { 258 257 cam_pos = vec3(0.0f, 0.0f, 2.0f); … … 299 298 } else if (e.key.keycode == SDL_SCANCODE_SPACE) { 300 299 cout << "Adding a plane" << endl; 301 float zOffset = -2.0f + (0.5f * numPlanes);300 float zOffset = -2.0f + (0.5f * modelPipeline.getObjects().size()); 302 301 303 302 vkDeviceWaitIdle(device); … … 314 313 315 314 createCommandBuffers(); 316 317 numPlanes++;318 315 } else { 319 316 cout << "Key event detected" << endl; -
vulkan-game.hpp
r1908591 r683dd55 113 113 114 114 size_t currentFrame; 115 size_t numPlanes = 0; // temp116 115 117 116 bool framebufferResized;
Note:
See TracChangeset
for help on using the changeset viewer.