Struct radiant_rs::Texture [] [src]

pub struct Texture { /* fields omitted */ }

A texture to draw or draw to.

Textures serve as drawing targets for userdefined Postprocessors or custom Programs. A texture can also be drawn with Renderer::rect().

Methods

impl Texture
[src]

[src]

Returns a texture builder for texture construction.

Examples

let tex = Texture::builder(&rendercontext)
                    .dimensions((640, 480))
                    .magnify(TextureFilter::Nearest)
                    .minify(TextureFilter::Linear)
                    .build()
                    .unwrap();

[src]

Creates a new texture with given dimensions. The texture will use linear interpolation for magnification or minification and internally use the F16F16F16F16 format.

[src]

Creates a new texture from given file.

[src]

Creates a new texture with given dimensions and filters. It will internally use the F16F16F16F16 format.

[src]

Clones texture with new filters and wrapping function. Both source and clone reference the same texture data.

[src]

Clears the texture with given color.

[src]

Returns the dimensions of the texture.

Trait Implementations

impl Clone for Texture
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl AsRenderTarget for Texture
[src]

[src]

Returns a RenderTarget representing a texture or a frame.

impl AsUniform for Texture
[src]

[src]

Auto Trait Implementations

impl !Send for Texture

impl !Sync for Texture