-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added swap chain rebuild to enable resize
- Loading branch information
Showing
6 changed files
with
104 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
// limitations under the License. | ||
// Modifications copyright (C) 2020 Leonardo Romor <[email protected]> | ||
// | ||
// This file contains the represents an intermediate interface simplify vulkan. | ||
// This file contains the represents an intermediate interface to simplify vulkan. | ||
|
||
#ifndef __SPACE_CORE_H_ | ||
#define __SPACE_CORE_H_ | ||
|
@@ -47,26 +47,28 @@ VULKAN_HPP_INLINE TargetType checked_cast(SourceType value) { | |
|
||
namespace space { | ||
namespace core { | ||
// Vulkan initialization routines | ||
struct SurfaceData { | ||
vk::UniqueSurfaceKHR surface; | ||
vk::Extent2D extent; | ||
}; | ||
|
||
// Hold the Vulkan configuration data | ||
// such as application name, engine, | ||
// and requested instance layers and extensions. | ||
struct VkAppConfig { | ||
const char *app_name; | ||
const char *engine_name; | ||
std::vector<std::string> instance_layers; | ||
std::vector<std::string> instance_extensions; | ||
}; | ||
|
||
// Holds the vulkan datacstructures | ||
// used to represent the vulkan implementation, | ||
// instantiation and configuration. It does not | ||
// include any rendering related vullkan calls or | ||
// data structures. | ||
struct VkAppContext { | ||
vk::DynamicLoader dynamic_loader; | ||
vk::UniqueInstance instance; | ||
vk::UniqueSurfaceKHR surface; | ||
vk::UniqueDevice device; | ||
vk::UniqueDebugUtilsMessengerEXT debug_utils_messenger; | ||
vk::PhysicalDevice physical_device; | ||
SurfaceData surface_data; | ||
uint32_t graphics_queue_family_index; | ||
uint32_t present_queue_family_index; | ||
}; | ||
|
@@ -86,6 +88,7 @@ namespace space { | |
uint32_t graphics_family_index, | ||
uint32_t present_family_index); | ||
vk::Format color_format; | ||
vk::Extent2D extent; | ||
vk::UniqueSwapchainKHR swap_chain; | ||
std::vector<vk::Image> images; | ||
std::vector<vk::UniqueImageView> image_views; | ||
|
Oops, something went wrong.