Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/core/texture/texture2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ impl Texture2D {
cpu_texture: &CpuTexture,
data: &[T],
) -> Self {
let mut texture = Self::new_empty::<T>(
let texture = Self::new_empty::<T>(
context,
cpu_texture.width,
cpu_texture.height,
Expand Down Expand Up @@ -101,7 +101,7 @@ impl Texture2D {
/// Will panic if the length of the data does not correspond to the width, height and format specified at construction.
/// It is therefore necessary to create a new texture if the texture size or format has changed.
///
pub fn fill<T: TextureDataType>(&mut self, data: &[T]) {
pub fn fill<T: TextureDataType>(&self, data: &[T]) {
check_data_length::<T>(self.width, self.height, 1, self.data_byte_size, data.len());
self.bind();
let mut data = data.to_owned();
Expand Down
Loading