Float fields working

This commit is contained in:
2024-10-20 01:38:27 +02:00
parent 89c95c0656
commit 84bb7b1eaa
7 changed files with 107 additions and 34 deletions

View File

@@ -41,13 +41,12 @@ calc_tight_light_projection :: (camera: Camera, light_direction: Vector3) -> Mat
light_projection := orthographic_lh_projection_matrix(final_aabb.min.x, final_aabb.max.x, final_aabb.min.y, final_aabb.max.y, final_aabb.min.z, final_aabb.max.z);
return light_projection * light_view;
}
update_light_buffer :: () {
scene := engine.current_scene;
camera := scene.camera;
camera := ifx engine.mode == .EDITING then engine.editor.camera else scene.camera;
light_data : Directional_Light_Buffer_Data;
light_data.direction = scene.directional_light.direction;

View File

@@ -1409,6 +1409,8 @@ make_point :: (x: float, y: float, s: float, t: float, color: Vector4) -> Point
}
get_text_size :: (using renderer: *Renderer, text: string, font_handle: Font_Handle) -> Vector2 {
if text.count == 0 return .{0,0};
size : Vector2;
font := *engine.renderer.fonts[font_handle - 1];