forked from pupbrained/vulkan-test
blegh
This commit is contained in:
parent
df6ec77374
commit
d489322ab2
|
@ -22,7 +22,7 @@ constexpr bool enableValidationLayers = false;
|
||||||
constexpr bool enableValidationLayers = true;
|
constexpr bool enableValidationLayers = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class HelloTriangleApplication {
|
class VulkanApp {
|
||||||
public:
|
public:
|
||||||
void run() {
|
void run() {
|
||||||
initWindow();
|
initWindow();
|
||||||
|
@ -144,13 +144,14 @@ class HelloTriangleApplication {
|
||||||
glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);
|
glfwExtensions = glfwGetRequiredInstanceExtensions(&glfwExtensionCount);
|
||||||
|
|
||||||
std::vector<const char*> extensions;
|
std::vector<const char*> extensions;
|
||||||
|
|
||||||
if (glfwExtensions) {
|
if (glfwExtensions) {
|
||||||
std::span<const char*> extSpan(glfwExtensions, glfwExtensionCount);
|
std::span<const char*> extSpan(glfwExtensions, glfwExtensionCount);
|
||||||
extensions.assign(extSpan.begin(), extSpan.end());
|
extensions.assign(extSpan.begin(), extSpan.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (enableValidationLayers)
|
if (enableValidationLayers)
|
||||||
extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
|
extensions.push_back("VK_EXT_debug_utils");
|
||||||
|
|
||||||
return extensions;
|
return extensions;
|
||||||
}
|
}
|
||||||
|
@ -168,7 +169,7 @@ class HelloTriangleApplication {
|
||||||
};
|
};
|
||||||
|
|
||||||
fn main() -> i32 {
|
fn main() -> i32 {
|
||||||
HelloTriangleApplication app;
|
VulkanApp app;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
app.run();
|
app.run();
|
||||||
|
|
Loading…
Reference in a new issue