update .gitmodules

This commit is contained in:
tylermurphy534 2022-09-22 18:29:34 -04:00
parent cbe1374b03
commit 888cdf15a9
7 changed files with 20 additions and 9 deletions

View file

@ -13,7 +13,7 @@ CCFLAGS += $(INCFLAGS)
LDFLAGS = -lm
LDFLAGS += $(INCFLAGS)
LDFLAGS += -lglfw
LDFLAGS += lib/glm/glm/libglm_static.a
LDFLAGS += -ldl
LDFLAGS += -lopenal
LDFLAGS += -lalut
LDFLAGS += -lvulkan

View file

@ -130,7 +130,7 @@ void XeDevice::pickPhysicalDevice() {
}
vkGetPhysicalDeviceProperties(physicalDevice, &properties);
std::cout << "physical device: " << properties.deviceName << std::endl;
std::cout << "Physical device: " << properties.deviceName << std::endl;
}
void XeDevice::createLogicalDevice() {
@ -280,14 +280,14 @@ void XeDevice::hasGflwRequiredInstanceExtensions() {
std::vector<VkExtensionProperties> extensions(extensionCount);
vkEnumerateInstanceExtensionProperties(nullptr, &extensionCount, extensions.data());
std::cout << "available extensions:" << std::endl;
std::cout << "Available extensions:" << std::endl;
std::unordered_set<std::string> available;
for (const auto &extension : extensions) {
std::cout << "\t" << extension.extensionName << std::endl;
available.insert(extension.extensionName);
}
std::cout << "required extensions:" << std::endl;
std::cout << "Required extensions:" << std::endl;
auto requiredExtensions = getRequiredExtensions();
for (const auto &required : requiredExtensions) {
std::cout << "\t" << required << std::endl;

View file

@ -2,6 +2,8 @@
#include "xe_image.hpp"
#include <chrono>
#include <iostream>
#include <AL/alc.h>
#include <AL/alut.h>
namespace xe {
@ -12,6 +14,7 @@ XeEngine::XeEngine(int width, int height, std::string name) : xeWindow{width, he
xeCamera{} {
loadDescriptorPool();
alutInit(0, NULL);
std::cout << "Audio device: " << alcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER) << "\n";
};
XeEngine::~XeEngine() {

View file

@ -11,6 +11,8 @@
namespace xe {
bool XeSwapChain::initialSwapChainCreated = false;
XeSwapChain::XeSwapChain(XeDevice &deviceRef, VkExtent2D extent)
: device{deviceRef}, windowExtent{extent} {
init();
@ -30,6 +32,7 @@ void XeSwapChain::init() {
createDepthResources();
createFramebuffers();
createSyncObjects();
initialSwapChainCreated = true;
}
XeSwapChain::~XeSwapChain() {
@ -382,19 +385,22 @@ VkPresentModeKHR XeSwapChain::chooseSwapPresentMode(
const std::vector<VkPresentModeKHR> &availablePresentModes) {
for (const auto &availablePresentMode : availablePresentModes) {
if (availablePresentMode == VK_PRESENT_MODE_MAILBOX_KHR) {
std::cout << "Present mode: Mailbox" << std::endl;
if(!initialSwapChainCreated)
std::cout << "Present mode: Mailbox" << std::endl;
return availablePresentMode;
}
}
for (const auto &availablePresentMode : availablePresentModes) {
if (availablePresentMode == VK_PRESENT_MODE_IMMEDIATE_KHR) {
std::cout << "Present mode: Immediate" << std::endl;
if(!initialSwapChainCreated)
std::cout << "Present mode: Immediate" << std::endl;
return availablePresentMode;
}
}
std::cout << "Present mode: V-Sync" << std::endl;
if(!initialSwapChainCreated)
std::cout << "Present mode: V-Sync" << std::endl;
return VK_PRESENT_MODE_FIFO_KHR;
}

View file

@ -83,6 +83,9 @@ class XeSwapChain {
std::vector<VkFence> inFlightFences;
std::vector<VkFence> imagesInFlight;
size_t currentFrame = 0;
static bool initialSwapChainCreated;
};
}

@ -1 +0,0 @@
Subproject commit c52df6d78ab7131a543326cd2257f267036754e1