mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-07-14 21:41:25 -07:00
dont submit draws for any empty glyphs
This commit is contained in:
@@ -420,7 +420,7 @@ fp_raster(Arena *arena, FP_Handle font_handle, F32 size, FP_RasterMode mode, Str
|
||||
U64 in_pitch = (U64)dib.dsBm.bmWidthBytes;
|
||||
U8 *out_data = (U8 *)result.atlas;
|
||||
U64 out_pitch = atlas_dim.x * 4;
|
||||
|
||||
U64 color_sum = 0;
|
||||
U8 *in_line = (U8 *)in_data;
|
||||
U8 *out_line = out_data;
|
||||
for(U64 y = 0; y < atlas_dim.y; y += 1)
|
||||
@@ -434,12 +434,17 @@ fp_raster(Arena *arena, FP_Handle font_handle, F32 size, FP_RasterMode mode, Str
|
||||
out_pixel[1] = 255;
|
||||
out_pixel[2] = 255;
|
||||
out_pixel[3] = in_pixel_byte;
|
||||
color_sum += in_pixel_byte;
|
||||
in_pixel += 4;
|
||||
out_pixel += 4;
|
||||
}
|
||||
in_line += in_pitch;
|
||||
out_line += out_pitch;
|
||||
}
|
||||
if(color_sum == 0)
|
||||
{
|
||||
result.atlas_dim = v2s16(0, 0);
|
||||
}
|
||||
}
|
||||
render_target->Release();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user