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

Added GPUTextEngine #412

Merged
merged 29 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b54f04a
TTF_Draw* functions should return true on success
captain0xff Oct 1, 2024
1621a10
updated .gitignore for clangd
captain0xff Oct 1, 2024
eac1af1
added gputextengine api and example (WIP)
captain0xff Oct 17, 2024
9f80731
Merge remote-tracking branch 'origin/gpu-text-engine' into gpu-text-e…
captain0xff Oct 17, 2024
eac37e1
updated for the latest SDL_ttf changes
captain0xff Oct 17, 2024
90126e2
updated the docs
captain0xff Oct 19, 2024
e5432dc
replaced the math_3d.h with my own custom implementation
captain0xff Oct 20, 2024
32a2e01
added a script to build and load the shaders
captain0xff Oct 22, 2024
8d70098
use SDL_PI_F instead of defining M_PI
captain0xff Oct 22, 2024
6461d91
no need to link libm anymore
captain0xff Oct 22, 2024
4b09066
added perspective and look_at functions
captain0xff Oct 24, 2024
4c8e006
improved the example to look more 3D
captain0xff Oct 24, 2024
4445dbf
added one pixel gap between the glyphs
captain0xff Oct 24, 2024
1bdbb32
moved around some stuff and updated the example
captain0xff Oct 24, 2024
ed26252
added font file and license
captain0xff Oct 25, 2024
f993143
formatted the example
captain0xff Oct 25, 2024
d80f917
Merge branch 'libsdl-org:main' into gpu-text-engine
captain0xff Oct 25, 2024
0267ea1
updated for the latest SDL_ttf API changes
captain0xff Oct 25, 2024
e1bad6c
fix the CI
captain0xff Oct 25, 2024
30e0cb2
more CI fixes
captain0xff Oct 25, 2024
e9dc9b3
add braces around ifs
captain0xff Oct 25, 2024
2976b86
added dx12 and metal shaders
captain0xff Oct 27, 2024
7741273
Add d3d11 shaders
madebr Oct 28, 2024
2b16b72
add shader support for the other backends
captain0xff Oct 30, 2024
b90f8e3
destroy the created text
captain0xff Oct 30, 2024
e25680e
remove the spirv binaries
captain0xff Oct 30, 2024
aec5435
check for issues after doing shady stuff
captain0xff Oct 30, 2024
b585c91
fixed minor issues in the example
captain0xff Nov 9, 2024
2c45250
more fixes
captain0xff Nov 9, 2024
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
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ endif()

add_library(${sdl3_ttf_target_name}
src/SDL_hashtable.c
src/SDL_gpu_textengine.c
src/SDL_renderer_textengine.c
src/SDL_surface_textengine.c
src/SDL_ttf.c
Expand Down Expand Up @@ -364,6 +365,7 @@ if(SDLTTF_SAMPLES)
add_executable(glfont examples/glfont.c)
add_executable(showfont examples/showfont.c examples/editbox.c)
add_executable(testapp examples/testapp.c)
add_executable(testgputext examples/testgputext.c)

set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL)
Expand All @@ -375,10 +377,10 @@ if(SDLTTF_SAMPLES)
target_link_libraries(glfont PRIVATE OpenGL::GL)
endif()

foreach(prog glfont showfont testapp)
foreach(prog glfont showfont testapp testgputext)
sdl_add_warning_options(${prog} WARNING_AS_ERROR ${SDLTTF_WERROR})
target_link_libraries(${prog} PRIVATE SDL3_ttf::${sdl3_ttf_target_name})
target_link_libraries(${prog} PRIVATE ${sdl3_target_name})
target_link_libraries(${prog} PRIVATE SDL3_ttf::${sdl3_ttf_target_name} m)
target_link_libraries(${prog} PRIVATE ${sdl3_target_name} m)

if(SDLTTF_SAMPLES_INSTALL)
install(TARGETS ${prog}
Expand Down
Loading
Loading