Skip to content

Commit

Permalink
Added Rgb24 format.
Browse files Browse the repository at this point in the history
  • Loading branch information
erlendp authored and Nazariglez committed Aug 21, 2024
1 parent 182ba9e commit 872011e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/notan_glow/src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ pub(crate) fn texture_type(tf: &TextureFormat) -> u32 {

pub(crate) fn texture_format(tf: &TextureFormat) -> u32 {
match tf {
TextureFormat::Rgb24 => glow::RGB,
TextureFormat::Rgba32 => glow::RGBA,
TextureFormat::Rgba32Float => RGBA,
TextureFormat::R8 => glow::RED,
Expand Down
2 changes: 2 additions & 0 deletions crates/notan_graphics/src/texture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ impl TextureFormat {
R8 => 1,
R8Uint => 1,
R16Uint => 2,
Rgb24 => 3,
Rgba32Float => 4 * 4,
_ => 4,
}
Expand Down Expand Up @@ -249,6 +250,7 @@ impl AsRef<Texture> for Texture {
#[derive(Debug, Clone, Copy, Eq, PartialEq)]
pub enum TextureFormat {
SRgba8,
Rgb24,
Rgba32,
R8,
R8Uint,
Expand Down

0 comments on commit 872011e

Please sign in to comment.