Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement SDLGPUDriver #201

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,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 @@ -108,6 +111,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 All @@ -122,6 +126,7 @@ add_library(mojoshader STATIC
MojoShader/mojoshader_d3d11.c
MojoShader/mojoshader_opengl.c
MojoShader/mojoshader_vulkan.c
MojoShader/mojoshader_sdlgpu.c
MojoShader/profiles/mojoshader_profile_common.c
MojoShader/profiles/mojoshader_profile_glsl.c
MojoShader/profiles/mojoshader_profile_hlsl.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
Loading