Skip to content

Commit

Permalink
minor api improvements for graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
mrDIMAS committed Aug 23, 2024
1 parent b985242 commit e35b03a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions fyrox-impl/src/renderer/framework/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ impl Default for BlendMode {
Reflect,
)]
pub struct BlendEquation {
rgb: BlendMode,
alpha: BlendMode,
pub rgb: BlendMode,
pub alpha: BlendMode,
}

#[derive(
Expand Down
8 changes: 4 additions & 4 deletions fyrox-impl/src/renderer/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ impl MatrixStorage {
}

/// Updates contents of the internal texture with provided matrices.
fn upload(
pub fn upload(
&mut self,
state: &PipelineState,
matrices: &[Matrix4<f32>],
matrices: impl Iterator<Item = Matrix4<f32>>,
sampler: u32,
) -> Result<(), FrameworkError> {
self.matrices.clear();
self.matrices.extend_from_slice(matrices);
self.matrices.extend(matrices);

// Select width for the texture by restricting width at 1024 pixels.
let matrices_tex_size = 1024;
Expand Down Expand Up @@ -172,7 +172,7 @@ impl MatrixStorageCache {
MatrixStorage::new(state)?
};

storage.upload(state, matrices, sampler)?;
storage.upload(state, matrices.iter().cloned(), sampler)?;

Ok(entry.insert(storage))
}
Expand Down

0 comments on commit e35b03a

Please sign in to comment.