Changeset c1c2021 in opengl-game for vulkan-ref.cpp
- Timestamp:
- Sep 23, 2019, 12:32:48 AM (5 years ago)
- Branches:
- feature/imgui-sdl, master, points-test
- Children:
- 502bd0b
- Parents:
- a0c5f28
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vulkan-ref.cpp
ra0c5f28 rc1c2021 164 164 165 165 VkPhysicalDevice physicalDevice = VK_NULL_HANDLE; 166 /*** END OF REFACTORED CODE ***/167 166 VkDevice device; 168 167 169 168 VkQueue graphicsQueue; 170 169 VkQueue presentQueue; 170 /*** END OF REFACTORED CODE ***/ 171 171 172 172 VkSwapchainKHR swapChain; … … 316 316 createSurface(); 317 317 pickPhysicalDevice(); 318 createLogicalDevice(); 318 319 /*** END OF REFACTORED CODE ***/ 319 createLogicalDevice();320 320 createSwapChain(); 321 321 createImageViews(); … … 561 561 return requiredExtensions.empty(); 562 562 } 563 /*** END OF REFACTORED CODE ***/564 563 565 564 void createLogicalDevice() { … … 609 608 vkGetDeviceQueue(device, indices.presentFamily.value(), 0, &presentQueue); 610 609 } 610 /*** END OF REFACTORED CODE ***/ 611 611 612 612 void createSwapChain() { … … 1674 1674 } 1675 1675 1676 /*** START OF REFACTORED CODE ***/ 1676 1677 void mainLoop() { 1677 1678 // TODO: Create some generic event-handling functions in game-gui-* … … 1690 1691 quit = true; 1691 1692 } 1693 /*** END OF REFACTORED CODE ***/ 1692 1694 if (e.type == SDL_WINDOWEVENT) { 1693 1695 if (e.window.event == SDL_WINDOWEVENT_SIZE_CHANGED || … … 1696 1698 } 1697 1699 } 1700 /*** START OF REFACTORED CODE ***/ 1698 1701 } 1699 1702 … … 1705 1708 vkDeviceWaitIdle(device); 1706 1709 } 1710 /*** END OF REFACTORED CODE ***/ 1707 1711 1708 1712 void drawFrame() { … … 1853 1857 } 1854 1858 1859 /*** START OF REFACTORED CODE ***/ 1855 1860 void cleanup() { 1856 1861 cleanupSwapChain(); 1862 /*** END OF REFACTORED CODE ***/ 1857 1863 1858 1864 vkDestroySampler(device, textureSampler, nullptr); … … 1880 1886 1881 1887 vkDestroyCommandPool(device, commandPool, nullptr); 1888 /*** START OF REFACTORED CODE ***/ 1882 1889 vkDestroyDevice(device, nullptr); 1883 1890 vkDestroySurfaceKHR(instance, surface, nullptr); 1884 1891 1885 /*** START OF REFACTORED CODE ***/1886 1892 if (enableValidationLayers) { 1887 1893 DestroyDebugUtilsMessengerEXT(instance, debugMessenger, nullptr); … … 1919 1925 gui->shutdown(); 1920 1926 delete gui; 1927 } 1928 1929 void cleanupSwapChain() { 1921 1930 /*** END OF REFACTORED CODE ***/ 1922 }1923 1924 void cleanupSwapChain() {1925 1931 vkDestroyImageView(device, depthImageView, nullptr); 1926 1932 vkDestroyImage(device, depthImage, nullptr); … … 1948 1954 vkFreeMemory(device, uniformBuffersMemory[i], nullptr); 1949 1955 } 1950 } 1956 /*** START OF REFACTORED CODE ***/ 1957 } 1958 /*** END OF REFACTORED CODE ***/ 1951 1959 1952 1960 void cleanupPipeline(GraphicsPipelineInfo& pipeline) {
Note:
See TracChangeset
for help on using the changeset viewer.