Reduced memory transfer of OpenGL gradient uniform upload. Rearranged gradient uniforms on OpenGL side to be more performant.

This commit is contained in:
shan 2022-10-05 16:07:43 -07:00
parent f7ce7244d0
commit 1eb8d972ba
7 changed files with 83 additions and 128 deletions

View file

@ -91,7 +91,7 @@ fn generate_box(frame: &mut Frame, bounds: Size) -> bool {
let gradient = |top_left: Point, bottom_right: Point| -> Gradient {
let mut builder = Gradient::linear(top_left, bottom_right);
let stops = thread_rng().gen_range(1..10u32);
let stops = thread_rng().gen_range(1..15u32);
let mut i = 0;
while i <= stops {