class
Texture2DTwo-dimensional texture
Static methods
Methods
- def bind(self, arg0: int, /) -> None
- Bind texture to given texture unit
- def generate_mipmap(self, /) -> None
- Generate mipmap
- def image_size(self, level: int) -> Vector2i
- Image size in given mip level
- def invalidate_image(self, level: int) -> None
- Invalidate texture image
- def invalidate_sub_image(self, level: int, offset: Vector2i, size: Vector2i) -> None
- Invalidate texture subimage
- def set_image(self, level: int, internal_format: TextureFormat, image: ImageView2D) -> None
- Set image data
- def set_storage(self, levels: int, internal_format: TextureFormat, size: Vector2i) -> None
- Set storage
- def set_sub_image(self, level: int, offset: Vector2i, image: ImageView2D) -> None
- Set image subdata
Special methods
Properties
- base_level: int set
- Base mip level
- border_color: object set
- Border color
- compare_function: SamplerCompareFunction set
- Depth texture comparison function
- compare_mode: SamplerCompareMode set
- Depth texture comparison mode
- depth_stencil_mode: SamplerDepthStencilMode set
- Depth/stencil texture mode
- id: int get
- OpenGL texture ID
- lod_bias: float set
- Level-of-detail bias
- magnification_filter: object set
- Magnification filter
- max_anisotropy: float set
- Max anisotropy
- max_level: int set
- Max mip level
- max_lod: float set
- Maximum level-of-detail
- min_lod: float set
- Minimum level-of-detail
- minification_filter: object set
- Minification filter
- srgb_decode: bool set
- sRGB decoding
- wrapping: object set
- Wrapping
Property documentation
magnum. gl. Texture2D. magnification_filter: object set
Magnification filter
This property accepts either magnum.SamplerFilter or gl.SamplerFilter, similarly to how the overloaded GL::Texture::setMagnificationFilter() works.
magnum. gl. Texture2D. minification_filter: object set
Minification filter
This property accepts either a tuple of magnum.SamplerFilter / gl.SamplerFilter and magnum.SamplerMipmap / gl.SamplerMipmap values or just magnum.SamplerFilter / gl.SamplerFilter alone in which case gl.SamplerMipmap.BASE will be used implicitly; similarly to how the overloaded GL::Texture::setMinificationFilter() works.