SFML community forums

General => Feature requests => Topic started by: Eugene on January 26, 2024, 08:06:08 am

Title: Does SFML support the Vulkan API on Android?
Post by: Eugene on January 26, 2024, 08:06:08 am
Good afternoon  :). My question is voiced in the title. I built a test example with Vulkan on Windows, everything is clear there and does not cause any questions. But how are things with support in Android? I have not found any information about it in free search and on the forum. I apologize if I searched badly and this topic is duplicated, in which case please kick me in the right direction :)
Title: Re: Does SFML support the Vulkan API on Android?
Post by: eXpl0it3r on January 26, 2024, 08:12:41 am
The SFML graphics module currently uses OpenGL, respectively OpenGL ES on mobile, for all the graphics.

As on the desktop, you should be able to create a sf::WindowBase (https://www.sfml-dev.org/documentation/2.6.1/classsf_1_1WindowBase.php) that doesn't give you an OpenGL context and call createVulkanSurface (https://www.sfml-dev.org/documentation/2.6.1/classsf_1_1WindowBase.php#a4bcb435cdb954f991f493976263a2fc1) to create a Vulkan surface.
Beyond that, you're on your own to implement everything else Vulkan.
Feel free to check out the Vulkan example in the repository: https://github.com/SFML/SFML/tree/master/examples/vulkan
Title: Re: Does SFML support the Vulkan API on Android?
Post by: Eugene on January 26, 2024, 08:26:30 am
That was my mistake though, it means I was trying to use sf::RenderWindow, and I should use sf::WindowBase (my first attempt to render a triangle using Vulkan in Android Studio with SFML). Well, got it, thanks a lot for the prompt reply! :)