misc updates to dependencies

removed freetype, updated vefontcache to latest and sokol + sokol gp
This commit is contained in:
2025-06-26 23:27:05 -04:00
parent 3fd4e139d9
commit 54db9a7d57
9 changed files with 171 additions and 22 deletions

View File

@ -1,4 +1,4 @@
VEFontCache Odin
VEFontCache Odin
Copyright 2024 Edward R. Gonzalez
This project is based on Vertex Engine GPU Font Cache

View File

@ -464,7 +464,7 @@ generate_shape_draw_list :: proc( draw_list : ^Draw_List, shape : Shaped_Text,
* Oversized will have a draw call setup to blit directly from the glyph buffer to the target.
* to_cache will blit the glyphs rendered from the buffer to the atlas.
*/
@(optimization_mode = "favor_size")
@(optimization_mode="favor_size")
batch_generate_glyphs_draw_list :: proc ( draw_list : ^Draw_List,
shape : Shaped_Text,
glyph_pack : ^#soa[dynamic]Glyph_Pack_Entry,
@ -641,7 +641,7 @@ batch_generate_glyphs_draw_list :: proc ( draw_list : ^Draw_List,
}
profile_end()
@(optimization_mode = "favor_size")
@(optimization_mode="favor_size")
generate_blit_from_atlas_draw_list :: #force_inline proc (draw_list : ^Draw_List, glyph_pack : #soa[]Glyph_Pack_Entry, sub_pack : []i32, colour : RGBAN )
{
profile(#procedure)

View File

@ -757,7 +757,7 @@ draw_shape_normalized_space :: #force_inline proc( ctx : ^Context,
position: Anchor point in normalized space (where the bottom-right vertex of the first glyph quad will be positioned)
<-> scale : Scale the glyph beyond its default scaling from its px_size.
*/
@(optimization_mode = "favor_size")
@(optimization_mode="favor_size")
draw_text_normalized_space :: proc( ctx : ^Context,
font : Font_ID,
px_size : f32,

View File

@ -42,11 +42,10 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
BlendState :: sokol_gfx.Blend_State
BorderColor :: sokol_gfx.Border_Color
BufferDesciption :: sokol_gfx.Buffer_Desc
BufferUsage :: sokol_gfx.Usage
BufferType :: sokol_gfx.Buffer_Type
ColorTargetState :: sokol_gfx.Color_Target_State
Filter :: sokol_gfx.Filter
ImageDesc :: sokol_gfx.Image_Desc
ImageUsage :: sokol_gfx.Image_Usage
PassAction :: sokol_gfx.Pass_Action
Range :: sokol_gfx.Range
ResourceState :: sokol_gfx.Resource_State
@ -68,15 +67,13 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
draw_list_vbuf = sokol_gfx.make_buffer( BufferDesciption {
size = size_of([4]f32) * 4 * Mega,
usage = BufferUsage.STREAM,
type = BufferType.VERTEXBUFFER,
usage = {vertex_buffer = true, stream_update = true},
})
verify( sokol_gfx.query_buffer_state( draw_list_vbuf) < ResourceState.FAILED, "Failed to make draw_list_vbuf" )
draw_list_ibuf = sokol_gfx.make_buffer( BufferDesciption {
size = size_of(u32) * 6 * Mega,
usage = BufferUsage.STREAM,
type = BufferType.INDEXBUFFER,
usage = {index_buffer = true, stream_update = true},
})
verify( sokol_gfx.query_buffer_state( draw_list_ibuf) < ResourceState.FAILED, "Failed to make draw_list_iubuf" )
@ -141,12 +138,11 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
{
glyph_rt_color = sokol_gfx.make_image( ImageDesc {
type = ._2D,
render_target = true,
usage = ImageUsage { render_attachment = true, immutable = true },
width = i32(ve_ctx.glyph_buffer.size.x),
height = i32(ve_ctx.glyph_buffer.size.y),
num_slices = 1,
num_mipmaps = 1,
usage = .IMMUTABLE,
pixel_format = .R8,
sample_count = 1,
// TODO(Ed): Setup labels for debug tracing/logging
@ -156,12 +152,11 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
glyph_rt_depth = sokol_gfx.make_image( ImageDesc {
type = ._2D,
render_target = true,
usage = ImageUsage { render_attachment = true, immutable = true },
width = i32(ve_ctx.glyph_buffer.size.x),
height = i32(ve_ctx.glyph_buffer.size.y),
num_slices = 1,
num_mipmaps = 1,
usage = .IMMUTABLE,
pixel_format = .DEPTH,
sample_count = 1,
})
@ -278,12 +273,11 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
{
atlas_rt_color = sokol_gfx.make_image( ImageDesc {
type = ._2D,
render_target = true,
usage = { render_attachment = true, immutable = true },
width = i32(ve_ctx.atlas.size.x),
height = i32(ve_ctx.atlas.size.y),
num_slices = 1,
num_mipmaps = 1,
usage = .IMMUTABLE,
pixel_format = .R8,
sample_count = 1,
// TODO(Ed): Setup labels for debug tracing/logging
@ -293,12 +287,11 @@ font_provider_setup_sokol_gfx_objects :: proc( ctx : ^VE_RenderData, ve_ctx : ve
atlas_rt_depth = sokol_gfx.make_image( ImageDesc {
type = ._2D,
render_target = true,
usage = { render_attachment = true, immutable = true },
width = i32(ve_ctx.atlas.size.x),
height = i32(ve_ctx.atlas.size.y),
num_slices = 1,
num_mipmaps = 1,
usage = .IMMUTABLE,
pixel_format = .DEPTH,
sample_count = 1,
})