Skip to content

Implement texture filtering #105

@bvssvni

Description

@bvssvni

Depends on PistonDevelopers/texture#32.

Change Texture into:

pub struct Texture {
    pub texture: Texture2d,
    pub min_filter: MinifySamplerFilter,
    pub mag_filter: MagnifySamplerFilter,
}
  • Map TextureSettings::get_mag for MagnifySamplerFilter
  • Add a function that maps TextureSettings::get_generate_mipmaps, TextureSettings::get_min and TextureSettings::get_mipmap for MinifySamplerFilter
  • If TextureSettings::get_generate_mipmaps is true, call Texture2d::with_mipmaps
  • In the impl of Graphics::tri_list_uv, use .sampled() to set .mag_filter and .min_filter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions