mirror of
https://github.com/love2d/love.git
synced 2026-08-16 16:20:42 +02:00
vulkan: implement vsync setting
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user