Implemented Maximal MSAA
This commit is contained in:
@@ -183,10 +183,15 @@ namespace vapp{
|
||||
VkImage depthImage;
|
||||
VkDeviceMemory depthImageMemory;
|
||||
VkImageView depthImageView;
|
||||
|
||||
VkImage colorImage;
|
||||
VkDeviceMemory colorImageMemory;
|
||||
VkImageView colorImageView;
|
||||
#pragma endregion
|
||||
#pragma region PrivateFunctions
|
||||
bool checkValidationLayerSupport();
|
||||
std::vector<const char*> getRequiredExtensions();
|
||||
VkSampleCountFlagBits getMaxUsableSampleCount();
|
||||
|
||||
void createInstance();
|
||||
void setupDebugMessenger();
|
||||
@@ -210,12 +215,13 @@ namespace vapp{
|
||||
void createCommandPool();
|
||||
VkFormat findSupportedFormat(const std::vector<VkFormat> &candidates, VkImageTiling tiling, VkFormatFeatureFlags features);
|
||||
VkFormat findDepthFormat();
|
||||
void createColorResources();
|
||||
void createDepthResources();
|
||||
VkCommandBuffer beginSingleTimeCommands();
|
||||
void endSingleTimeCommands(VkCommandBuffer commandBuffer);
|
||||
void transitionImageLayout(VkImage image, VkFormat format, VkImageLayout oldLayout, VkImageLayout newLayout, uint32_t mipLevels);
|
||||
void copyBufferToImage(VkBuffer buffer, VkImage image, uint32_t width, uint32_t height);
|
||||
void createImage(uint32_t width, uint32_t height, uint32_t mipLevels, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags properties, VkImage& image, VkDeviceMemory &imageMemory);
|
||||
void createImage(uint32_t width, uint32_t height, uint32_t mipLevels, VkSampleCountFlagBits numSamples, VkFormat format, VkImageTiling tiling, VkImageUsageFlags usage, VkMemoryPropertyFlags properties, VkImage& image, VkDeviceMemory &imageMemory);
|
||||
void generateMipmaps(VkImage image, VkFormat imageFormat, int32_t texWidth, int32_t texHeight, uint32_t mipLevels);
|
||||
void createTextureImage();
|
||||
VkImageView createImageView(VkImage image, VkFormat format, VkImageAspectFlags aspectFlags, uint32_t mipLevels);
|
||||
@@ -254,6 +260,8 @@ namespace vapp{
|
||||
bool framebufferResized = false;
|
||||
std::string MODEL_PATH;
|
||||
std::string TEXTURE_PATH;
|
||||
|
||||
VkSampleCountFlagBits msaaSamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
#pragma endregion
|
||||
#pragma region PublicFunctions
|
||||
void run(const char *windowName, const uint32_t width = 800, const uint32_t height = 600);
|
||||
|
||||
Reference in New Issue
Block a user