render doc nows shows the lettter...
This commit is contained in:
parent
3402701f99
commit
7ec00edfbd
@ -484,7 +484,7 @@ cache_glyph :: proc( ctx : ^Context, font : FontID, glyph_index : Glyph, scale,
|
||||
{
|
||||
case .Move:
|
||||
if path.num > 0 {
|
||||
draw_filled_path( & ctx.draw_list, outside, array_to_slice(path), scale, translate )
|
||||
draw_filled_path( & ctx.draw_list, outside, array_to_slice(path), scale, translate, ctx.debug_print_verbose )
|
||||
}
|
||||
clear(path)
|
||||
fallthrough
|
||||
@ -523,7 +523,7 @@ cache_glyph :: proc( ctx : ^Context, font : FontID, glyph_index : Glyph, scale,
|
||||
assert(false, "Unknown edge type or invalid")
|
||||
}
|
||||
if path.num > 0 {
|
||||
draw_filled_path( & ctx.draw_list, outside, array_to_slice(path), scale, translate )
|
||||
draw_filled_path( & ctx.draw_list, outside, array_to_slice(path), scale, translate, ctx.debug_print_verbose )
|
||||
}
|
||||
|
||||
// Note(Original Author): Apend the draw call
|
||||
@ -533,7 +533,7 @@ cache_glyph :: proc( ctx : ^Context, font : FontID, glyph_index : Glyph, scale,
|
||||
}
|
||||
|
||||
parser_free_shape( & entry.parser_info, shape )
|
||||
return false
|
||||
return true
|
||||
}
|
||||
|
||||
cache_glyph_to_atlas :: proc( ctx : ^Context, font : FontID, glyph_index : Glyph )
|
||||
|
@ -176,6 +176,7 @@ decide_codepoint_region :: proc( ctx : ^Context, entry : ^Entry, glyph_index : G
|
||||
return
|
||||
}
|
||||
|
||||
over_sample = ctx.atlas.over_sample
|
||||
assert(region != nil)
|
||||
return
|
||||
}
|
||||
|
@ -233,9 +233,9 @@ draw_filled_path :: proc( draw_list : ^DrawList, outside_point : Vec2, path : []
|
||||
{
|
||||
if debug_print_verbose
|
||||
{
|
||||
log("outline_path: \n")
|
||||
log("outline_path:")
|
||||
for point in path {
|
||||
logf(" %.2f %.2f\n", point.x * scale )
|
||||
logf(" point: %v", point * scale + translate )
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ render :: proc()
|
||||
ve.set_colour( & ve_font_cache, { 1.0, 1.0, 1.0, 1.0 } )
|
||||
ve.configure_snap( & ve_font_cache, u32(state.app_window.extent.x * 2.0), u32(state.app_window.extent.y * 2.0) )
|
||||
|
||||
ve.draw_text( & ve_font_cache, fdef.ve_id, text_test_str, {0.0, 0.0}, Vec2{1 / width, 1 / height} )
|
||||
ve.draw_text( & ve_font_cache, fdef.ve_id, text_test_str, {0.4, 0.1}, Vec2{1 / width, 1 / height} )
|
||||
}
|
||||
|
||||
// Process the draw calls for drawing text
|
||||
@ -100,11 +100,12 @@ render :: proc()
|
||||
{
|
||||
draw_list := ve.get_draw_list( & ve_font_cache )
|
||||
|
||||
sokol_gfx.update_buffer( draw_list_vbuf, Range{ draw_list.vertices.data, draw_list.vertices.num })
|
||||
sokol_gfx.update_buffer( draw_list_ibuf, Range{ draw_list.indices.data, draw_list.indices.num })
|
||||
|
||||
draw_list_vert_slice := array_to_slice(draw_list.vertices)
|
||||
draw_list_vert_slice := array_to_slice(draw_list.vertices)
|
||||
draw_list_index_slice := array_to_slice(draw_list.indices)
|
||||
|
||||
sokol_gfx.update_buffer( draw_list_vbuf, Range{ draw_list.vertices.data, draw_list.vertices.num * size_of(ve.Vertex) })
|
||||
sokol_gfx.update_buffer( draw_list_ibuf, Range{ draw_list.indices.data, draw_list.indices.num * size_of(u32) })
|
||||
|
||||
draw_list_call_slice := array_to_slice(draw_list.calls)
|
||||
for & draw_call in array_to_slice(draw_list.calls)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user