Skip to content

Commit

Permalink
Implement SDLGPUDriver
Browse files Browse the repository at this point in the history
Co-authored-by: Ethan Lee <[email protected]>
Co-authored-by: Caleb Cornett <[email protected]>
  • Loading branch information
3 people committed Jun 21, 2024
1 parent 7fe7e14 commit 060febd
Show file tree
Hide file tree
Showing 5 changed files with 5,137 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ add_definitions(
-DFNA3D_DRIVER_VULKAN
-DFNA3D_DRIVER_OPENGL
)
if(BUILD_SDL3)
add_definitions(-DFNA3D_DRIVER_SDL)
endif()
add_definitions(
-DMOJOSHADER_NO_VERSION_INCLUDE
-DMOJOSHADER_USE_SDL_STDLIB
Expand Down Expand Up @@ -101,6 +104,7 @@ add_library(FNA3D
src/FNA3D.c
src/FNA3D_Driver_D3D11.c
src/FNA3D_Driver_OpenGL.c
src/FNA3D_Driver_SDL.c
src/FNA3D_Driver_Vulkan.c
src/FNA3D_Image.c
src/FNA3D_CommandBuffer.c
Expand Down
3 changes: 3 additions & 0 deletions src/FNA3D.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
/* Drivers */

static const FNA3D_Driver *drivers[] = {
#if FNA3D_DRIVER_SDL
&SDLGPUDriver,
#endif
#if FNA3D_DRIVER_D3D11
&D3D11Driver,
#endif
Expand Down
1 change: 1 addition & 0 deletions src/FNA3D_Driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ typedef struct FNA3D_Driver
FNA3D_SHAREDINTERNAL FNA3D_Driver VulkanDriver;
FNA3D_SHAREDINTERNAL FNA3D_Driver D3D11Driver;
FNA3D_SHAREDINTERNAL FNA3D_Driver OpenGLDriver;
FNA3D_SHAREDINTERNAL FNA3D_Driver SDLGPUDriver;
FNA3D_SHAREDINTERNAL FNA3D_Driver GNMXDriver;

#endif /* FNA3D_DRIVER_H */
Expand Down
Loading

0 comments on commit 060febd

Please sign in to comment.