raylib/cmake
google-labs-jules[bot] b93ec12bfe feat: Add initial Vulkan backend framework and compile flag
I've introduced the foundational infrastructure for a Vulkan rendering backend in raylib.

Key changes:
- CMake:
    - I added a `SUPPORT_VULKAN` option (default OFF) to enable Vulkan.
    - It finds the Vulkan SDK and links appropriate libraries when enabled.
    - I defined `CF_VULKAN_` (0 by default, 1 if Vulkan enabled) and `GRAPHICS_API_VULKAN` preprocessor macros.
    - I updated `LibraryConfigurations.cmake` and `src/CMakeLists.txt` to handle Vulkan as a graphics API.
- Vulkan Abstraction Layer:
    - I created `src/rlvk.h` and `src/rlvk.c` with stub implementations for Vulkan rendering functions (e.g., `rlvkInit`, `rlvkClose`, drawing functions). These are compiled only when `SUPPORT_VULKAN` is ON.
- Core Integration:
    - `rlgl.h` and `rcore.c` now have conditional code paths for `GRAPHICS_API_VULKAN`.
    - `InitWindow` and `CloseWindow` in `rcore.c` call Vulkan-specific platform and backend initialization/deinitialization stubs.
- Platform Layer (GLFW):
    - `src/platforms/rcore_desktop_glfw.c` includes stubbed `InitPlatformVulkan` and `ClosePlatformVulkan` to set up GLFW for a Vulkan context (actual Vulkan instance/surface creation is stubbed).

This commit establishes the necessary build system changes and C code structure to allow for the incremental implementation of the Vulkan renderer. Currently, enabling Vulkan will compile the stubs, allowing your application to run but without actual Vulkan rendering. The `CF_VULKAN_` flag controls the compilation and selection of Vulkan as the default renderer when active.
2025-06-01 02:12:36 +00:00
..
AddIfFlagCompiles.cmake CMake: Move reusable code to new cmake/ directory 2018-05-21 01:08:29 +02:00
CompileDefinitions.cmake feat: Add initial Vulkan backend framework and compile flag 2025-06-01 02:12:36 +00:00
CompilerFlags.cmake Documentation cmake (#1549) 2021-01-26 14:34:27 +01:00
EnumOption.cmake CMake: Fail when -D{PLATFORM,OPENGL_VERSION}=INVALID_VALUE 2018-07-23 21:00:48 +02:00
GlfwImport.cmake Revert "[build][cmake] Improve cmake config file generation (#4541)" 2024-11-28 22:44:42 +01:00
InstallConfigurations.cmake Revert "[build][cmake] Improve cmake config file generation (#4541)" 2024-11-28 22:44:42 +01:00
JoinPaths.cmake Add join_paths and join prefix with include/lib dirs (#1383) 2020-09-25 16:20:49 +02:00
LibraryConfigurations.cmake feat: Add initial Vulkan backend framework and compile flag 2025-06-01 02:12:36 +00:00
LibraryPathToLinkerFlags.cmake CMake: Major cleanup to support find_package(raylib) 2018-07-29 12:35:35 +02:00
PackConfigurations.cmake Add packaging for distros with deb- and rpm-based packages. (#2877) 2023-01-21 18:50:38 +01:00
ParseConfigHeader.cmake [build] Making config.h fully available to CMake users (#4044) 2024-06-16 10:49:59 +02:00
PopulateConfigVariablesLocally.cmake CMake: Major cleanup to support find_package(raylib) 2018-07-29 12:35:35 +02:00
raylib-config-version.cmake Revert "[build][cmake] Improve cmake config file generation (#4541)" 2024-11-28 22:44:42 +01:00
raylib-config.cmake [cmake] set correct description for verbose option 2025-04-06 22:33:46 -07:00
Uninstall.cmake [build]: add uninstall cmake target (#3511) 2023-11-06 10:12:36 +01:00