vulkan: implement vsync setting

This commit is contained in:
niki
2022-08-19 21:40:21 +02:00
parent be8778b4eb
commit 7be9bb3ecc
6 changed files with 41 additions and 25 deletions
+9
View File
@@ -7,6 +7,7 @@ namespace love {
namespace graphics {
namespace vulkan {
static uint32_t numShaderSwitches;
static int vsync = 1;
void Vulkan::shaderSwitch() {
numShaderSwitches++;
@@ -20,6 +21,14 @@ void Vulkan::resetShaderSwitches() {
numShaderSwitches = 0;
}
void Vulkan::setVsync(int value) {
vsync = value;
}
int Vulkan::getVsync() {
return vsync;
}
VkFormat Vulkan::getVulkanVertexFormat(DataFormat format) {
switch (format) {
case DATAFORMAT_FLOAT: