MCPcopy Create free account
hub / github.com/Overv/VulkanTutorial / HelloTriangleApplication

Class HelloTriangleApplication

code/29_mipmapping.cpp:139–1702  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137};
138
139class HelloTriangleApplication {
140public:
141 void run() {
142 initWindow();
143 initVulkan();
144 mainLoop();
145 cleanup();
146 }
147
148private:
149 GLFWwindow* window;
150
151 VkInstance instance;
152 VkDebugUtilsMessengerEXT debugMessenger;
153 VkSurfaceKHR surface;
154
155 VkPhysicalDevice physicalDevice = VK_NULL_HANDLE;
156 VkDevice device;
157
158 VkQueue graphicsQueue;
159 VkQueue presentQueue;
160
161 VkSwapchainKHR swapChain;
162 std::vector<VkImage> swapChainImages;
163 VkFormat swapChainImageFormat;
164 VkExtent2D swapChainExtent;
165 std::vector<VkImageView> swapChainImageViews;
166 std::vector<VkFramebuffer> swapChainFramebuffers;
167
168 VkRenderPass renderPass;
169 VkDescriptorSetLayout descriptorSetLayout;
170 VkPipelineLayout pipelineLayout;
171 VkPipeline graphicsPipeline;
172
173 VkCommandPool commandPool;
174
175 VkImage depthImage;
176 VkDeviceMemory depthImageMemory;
177 VkImageView depthImageView;
178
179 uint32_t mipLevels;
180 VkImage textureImage;
181 VkDeviceMemory textureImageMemory;
182 VkImageView textureImageView;
183 VkSampler textureSampler;
184
185 std::vector<Vertex> vertices;
186 std::vector<uint32_t> indices;
187 VkBuffer vertexBuffer;
188 VkDeviceMemory vertexBufferMemory;
189 VkBuffer indexBuffer;
190 VkDeviceMemory indexBufferMemory;
191
192 std::vector<VkBuffer> uniformBuffers;
193 std::vector<VkDeviceMemory> uniformBuffersMemory;
194 std::vector<void*> uniformBuffersMapped;
195
196 VkDescriptorPool descriptorPool;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected