[][src]Struct web_glitz::rendering::RenderTargetDescriptor

pub struct RenderTargetDescriptor<C, Ds> { /* fields omitted */ }

Describes a RenderTarget for a RenderPass.

Zero or more color images and zero or 1 depth-stencil image(s) may be attached to the render target. Together these images define a Framebuffer which commands in the render pass task may modify: a [RenderBuffer] will be allocated in the framebuffer for each of the attached images. For each attachment, the render target must also describe how image data from the image is loaded into its associated render buffer before the render pass, and how image data from the render buffer is stored back into the image after the render pass.

See also [RenderingContext::create_render_target] and [RenderingContext::try_create_render_target] for details on how a RenderTargetDescriptor may be used to initialize a RenderTarget.

Examples

The following example constructs a RenderTargetDescriptor with one color attachment:

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

We attach a Renderbuffer as the first (and only) color attachment that stores floating point pixel data. We declare a "load operation" of LoadOp::Load to indicate that at the start of any RenderPass that uses this render target, the image data currently stored in the renderbuffer needs to be loaded into framebuffer. A declare a "store operation" of StoreOp::Store to indicate that at the end of the render pass, the data in the framebuffer (as modified by the render pass task) needs to be stored back into the renderbuffer. See LoadOp and StoreOp for details on alternative load and store operations.

The image we attach must implement AsAttachment, as well as the AttachColorFloat marker trait to indicate that the image's [InternalFormat] is compatible with floating point data. You may attach other image types than Renderbuffers; for example, we might also use a [Texture2D] level:


use web_glitz::image::format::RGBA8;
use web_glitz::image::texture_2d::Texture2DDescriptor;
use web_glitz::image::MipmapLevels;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.try_create_texture_2d(&Texture2DDescriptor {
    format: RGBA8,
    width: 500,
    height: 500,
    levels: MipmapLevels::Complete
}).unwrap();

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(color_image.base_level_mut(), LoadOp::Load, StoreOp::Store);

As we use [attach_color_float] to attach the image as a floating point attachment, the [RenderBuffer] that is allocated for this attachment in framebuffer will store the image data as float values. Any graphics pipeline that draws to the framebuffer during the render pass must output float values (rather than integer or unsigned integer values).

You may also attach color images that store integer values with [attach_color_integer] if the image reference implements the AttachColorInteger marker trait:

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

Or color images that store unsigned integer values with [attach_color_unsigned_integer] if the image reference implements the AttachColorUnsignedInteger marker trait:

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

It is also possible to attach multiple color images (up to 16):

use web_glitz::image::format::{RGBA8, RGBA8I};
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image_0 = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let mut color_image_1 = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image_0, LoadOp::Load, StoreOp::Store)
    .attach_color_integer(&mut color_image_1, LoadOp::Load, StoreOp::Store);

The first image that is attached will be attached to the framebuffer in color slot 0, the second image will be attached in color slot 1, etc.

Note that a rendering context does not always support up to 16 color attachments (see [RenderingContext::max_color_attachments]), but always support at least 1 color attachment. Therefor, if you declare a RenderTargetDescriptor with only a single color attachment, you may use [RenderingContext::create_render_target] to obtain a RenderTarget; this always succeeds. However, if you declare a RenderTargetDescriptor with more than 1 color attachment, you must use [RenderingContext::try_create_render_target] instead, which may fail with an error if the number of attachments you specified exceeds [RenderingContext::max_color_attachments].

Finally, you may attach a single depth-stencil image. This may be an image that stores combined depth and stencil values attached with [attach_depth_stencil] if the image reference implements the AttachDepthStencil marker trait:

use web_glitz::image::format::Depth24Stencil8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut depth_stencil_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: Depth24Stencil8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_depth_stencil(&mut depth_stencil_image, LoadOp::Load, StoreOp::Store);

Or an image that stores only depth values attached with [attach_depth] if the image reference implements the AttachDepth marker trait:

use web_glitz::image::format::DepthComponent24;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut depth_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: DepthComponent24,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_depth(&mut depth_image, LoadOp::Load, StoreOp::Store);

Or an image that stores only stencil values attached with [attach_stencil] if the image reference implements the AttachStencil marker trait:

use web_glitz::image::format::StencilIndex8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut stencil_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: StencilIndex8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_stencil(&mut stencil_image, LoadOp::Load, StoreOp::Store);

Implementations

impl RenderTargetDescriptor<(), ()>[src]

pub fn new() -> Self[src]

Creates a new RenderTargetDescriptor without any attachments.

impl<C> RenderTargetDescriptor<C, ()>[src]

pub fn attach_depth_stencil<Ds>(
    self,
    image: Ds,
    load_op: LoadOp<(f32, i32)>,
    store_op: StoreOp
) -> RenderTargetDescriptor<C, DepthStencilAttachment<Ds>> where
    Ds: AttachDepthStencil
[src]

Attaches an image to the depth-stencil slot that stores combined depth and stencil values.

Example

use web_glitz::image::format::Depth24Stencil8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut depth_stencil_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: Depth24Stencil8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_depth_stencil(&mut depth_stencil_image, LoadOp::Load, StoreOp::Store);

pub fn attach_depth<Ds>(
    self,
    image: Ds,
    load_op: LoadOp<f32>,
    store_op: StoreOp
) -> RenderTargetDescriptor<C, DepthAttachment<Ds>> where
    Ds: AttachDepth
[src]

Attaches an image to the depth-stencil slot that stores depth values.

Example

use web_glitz::image::format::DepthComponent24;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut depth_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: DepthComponent24,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_depth(&mut depth_image, LoadOp::Load, StoreOp::Store);

pub fn attach_stencil<Ds>(
    self,
    image: Ds,
    load_op: LoadOp<i32>,
    store_op: StoreOp
) -> RenderTargetDescriptor<C, StencilAttachment<Ds>> where
    Ds: AttachStencil
[src]

Attaches an image to the depth-stencil slot that stores stencil values.

Example

use web_glitz::image::format::StencilIndex8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut stencil_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: StencilIndex8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_stencil(&mut stencil_image, LoadOp::Load, StoreOp::Store);

impl<Ds> RenderTargetDescriptor<(), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(FloatAttachment<C>,), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(IntegerAttachment<C>,), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(UnsignedIntegerAttachment<C>,), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, Ds> RenderTargetDescriptor<(C0,), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, Ds> RenderTargetDescriptor<(C0, C1), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, Ds> RenderTargetDescriptor<(C0, C1, C2), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, Ds> RenderTargetDescriptor<(C0, C1, C2, C3), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

impl<C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, Ds> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14), Ds>[src]

pub fn attach_color_float<C>(
    self,
    image: C,
    load_op: LoadOp<[f32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, FloatAttachment<C>), Ds> where
    C: AttachColorFloat
[src]

Attaches an image that stores floating point values to the next color slot.

Example

use web_glitz::image::format::RGBA8;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_float(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[i32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, IntegerAttachment<C>), Ds> where
    C: AttachColorInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8I;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8I,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

pub fn attach_color_unsigned_integer<C>(
    self,
    image: C,
    load_op: LoadOp<[u32; 4]>,
    store_op: StoreOp
) -> RenderTargetDescriptor<(C0, C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, C13, C14, UnsignedIntegerAttachment<C>), Ds> where
    C: AttachColorUnsignedInteger
[src]

Attaches an image that stores integer values to the next color slot.

Example

use web_glitz::image::format::RGBA8UI;
use web_glitz::image::renderbuffer::RenderbufferDescriptor;
use web_glitz::rendering::{RenderTargetDescriptor, LoadOp, StoreOp};

let mut color_image = context.create_renderbuffer(&RenderbufferDescriptor{
    format: RGBA8UI,
    width: 500,
    height: 500
});

let render_target_descriptor = RenderTargetDescriptor::new()
    .attach_color_unsigned_integer(&mut color_image, LoadOp::Load, StoreOp::Store);

Auto Trait Implementations

impl<C, Ds> RefUnwindSafe for RenderTargetDescriptor<C, Ds> where
    C: RefUnwindSafe,
    Ds: RefUnwindSafe

impl<C, Ds> Send for RenderTargetDescriptor<C, Ds> where
    C: Send,
    Ds: Send

impl<C, Ds> Sync for RenderTargetDescriptor<C, Ds> where
    C: Sync,
    Ds: Sync

impl<C, Ds> Unpin for RenderTargetDescriptor<C, Ds> where
    C: Unpin,
    Ds: Unpin

impl<C, Ds> UnwindSafe for RenderTargetDescriptor<C, Ds> where
    C: UnwindSafe,
    Ds: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.