Open
Description
If I create a renderer with Vulkan and make it use VSync, it will use 100% of app's thread. However, with OpenGL this problem doesn't exist.
Steps to reproduce
SDL_Init(SDL_INIT_VIDEO | SDL_INIT_EVENTS)
SDL_Window* win = SDL_CreateWindow("Test", 640, 480, SDL_WINDOW_HIDDEN);
SDL_Renderer* ren = SDL_CreateRenderer(win, "vulkan");
if (!SDL_SetRenderVSync(ren, true)) {
printf("VSync not supported: %s\n", SDL_GetError());
return 1;
}
SDL_ShowWindow(win);
SDL_Event e;
bool running = true;
while (running) {
while (SDL_PollEvent(&e)) {
switch (e.type) {
case SDL_EVENT_QUIT: running = false; break;
}
}
SDL_SetRenderDrawColor(ren, 32, 32, 32, 255);
SDL_RenderClear(ren);
SDL_RenderPresent(ren);
}
SDL_DestroyWindow(win);
SDL_DestroyRenderer(ren);
SDL_Quit();
(window and renderer are created successfully, and it doesn't say that VSync is not supported)
Additional info
SDL Branch: 3.2.x
OS: Mint 22
Graphics server: X11
Metadata
Metadata
Assignees
Labels
No labels