Get working "Hello Triangle" program going with vertex and fragment shaders
This commit is contained in:
@@ -64,15 +64,29 @@ private:
|
||||
VkPhysicalDevice mPhysicalDevice = VK_NULL_HANDLE;
|
||||
VkDevice mLogicalDevice;
|
||||
VkSurfaceKHR mSurface;
|
||||
|
||||
VkSwapchainKHR mSwapChain;
|
||||
std::vector<VkImage> mSwapChainImages;
|
||||
std::vector<VkImageView> mSwapChainImageViews;
|
||||
VkFormat mSwapChainImageFormat;
|
||||
VkExtent2D mSwapChainExtent;
|
||||
std::vector<VkFramebuffer> mSwapChainFramebuffers;
|
||||
|
||||
VkRenderPass mRenderPass;
|
||||
VkPipelineLayout mPipelineLayout;
|
||||
VkPipeline mGraphicsPipeline;
|
||||
|
||||
VkCommandPool mCommandPool;
|
||||
VkCommandBuffer mCommandBuffer;
|
||||
|
||||
VkQueue mGraphicsQueue;
|
||||
VkQueue mPresentQueue;
|
||||
|
||||
VkSemaphore mImageAvailableSemaphore;
|
||||
VkSemaphore mRenderFinishedSemaphore;
|
||||
VkFence mInFlightFence;
|
||||
|
||||
|
||||
VkDebugUtilsMessengerEXT mDebugMessenger;
|
||||
|
||||
void createInstance();
|
||||
@@ -80,11 +94,20 @@ private:
|
||||
void createLogicalDevice();
|
||||
void createSwapChain();
|
||||
void createImageViews();
|
||||
void createRenderPass();
|
||||
void createGraphicsPipeline();
|
||||
void createFramebuffers();
|
||||
void createCommandPool();
|
||||
void createCommandBuffer();
|
||||
void createSyncObjects();
|
||||
|
||||
void recordCommandBuffer(VkCommandBuffer, uint32_t);
|
||||
void drawFrame();
|
||||
|
||||
QueueFamilyIndices findQueueFamilies(VkPhysicalDevice);
|
||||
bool isDeviceSuitable(VkPhysicalDevice);
|
||||
bool checkDeviceExtensionSupport(VkPhysicalDevice);
|
||||
VkShaderModule createShaderModule(const std::vector<uint8_t>&);
|
||||
SwapChainSupportDetails querySwapChainSupport(VkPhysicalDevice);
|
||||
VkSurfaceFormatKHR chooseSwapSurfaceFormat(const std::vector<VkSurfaceFormatKHR>&);
|
||||
VkPresentModeKHR chooseSwapPresentMode(const std::vector<VkPresentModeKHR>&);
|
||||
|
||||
Reference in New Issue
Block a user