[][src]Trait gfx_gtk::FactoryExt

pub trait FactoryExt<R: Resources>: FactoryExt<R> {
    fn create_gtk_compatible_targets<CF, DF>(
        &mut self,
        aa: AaMode,
        width: Size,
        height: Size
    ) -> Result<RenderSurfaceWithDepth<R, CF, DF>>
    where
        CF: Formatted,
        CF::Channel: TextureChannel + RenderChannel,
        CF::Surface: RenderSurface + TextureSurface,
        DF: Formatted,
        DF::Channel: TextureChannel + RenderChannel,
        DF::Surface: DepthSurface + TextureSurface
, { ... }
fn create_msaa_pipeline_state<I: PipelineInit>(
        &mut self,
        aa: AaMode,
        vertex_shader: &[u8],
        pixel_shader: &[u8],
        init: I
    ) -> Result<PipelineState<R, I::Meta>, PipelineStateError<String>> { ... }
fn create_gtk_compatible_depth_target<D>(
        &mut self,
        aa: AaMode,
        width: Size,
        height: Size
    ) -> Result<DepthSurface<R, D>>
    where
        D: Formatted,
        D::Channel: TextureChannel + RenderChannel,
        D::Surface: DepthSurface + TextureSurface
, { ... }
fn create_gtk_compatible_render_target<F>(
        &mut self,
        aa: AaMode,
        width: Size,
        height: Size
    ) -> Result<RenderSurface<R, F>>
    where
        F: Formatted,
        F::Channel: TextureChannel + RenderChannel,
        F::Surface: RenderSurface + TextureSurface
, { ... } }

Extends gfx::traits::FactoryExt with utility functions specific to the gfx to gtk integration

Provided methods

fn create_gtk_compatible_targets<CF, DF>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<RenderSurfaceWithDepth<R, CF, DF>> where
    CF: Formatted,
    CF::Channel: TextureChannel + RenderChannel,
    CF::Surface: RenderSurface + TextureSurface,
    DF: Formatted,
    DF::Channel: TextureChannel + RenderChannel,
    DF::Surface: DepthSurface + TextureSurface, 

Creates a render target (with its associated texture source view and a depth target which are resonably compatible with something that we can blit onto a GtkGlView framebuffer

  • aa antialiasing mode, currently supported Single and Multi(4)
  • width width of the client area of the containing widget
  • height height of the client area of the containing widget`

fn create_msaa_pipeline_state<I: PipelineInit>(
    &mut self,
    aa: AaMode,
    vertex_shader: &[u8],
    pixel_shader: &[u8],
    init: I
) -> Result<PipelineState<R, I::Meta>, PipelineStateError<String>>

creates a Gfx PSO given a vertex/pixel shader pair. The PSO will contain a MSAA-enabled rasterizer if AaMode is Multi(_)

  • aa antialiasing mode, currently supported Single and Multi(4) vertex_shader GLSL source code of the vertex shader pixel_shader GLSL source code of the pixel shader init the gfx pipeline initializer for I

fn create_gtk_compatible_depth_target<D>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<DepthSurface<R, D>> where
    D: Formatted,
    D::Channel: TextureChannel + RenderChannel,
    D::Surface: DepthSurface + TextureSurface, 

Creates a depth target for the GlArea client area

  • aa antialiasing mode, currently supported Single and Multi(4)
  • width width of the client area of the containing widget
  • height height of the client area of the containing widget`

fn create_gtk_compatible_render_target<F>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<RenderSurface<R, F>> where
    F: Formatted,
    F::Channel: TextureChannel + RenderChannel,
    F::Surface: RenderSurface + TextureSurface, 

Creates a render target for the GlArea client area

  • aa antialiasing mode, currently supported Single and Multi(4)
  • width width of the client area of the containing widget
  • height height of the client area of the containing widget`
Loading content...

Implementors

impl<F, R> FactoryExt<R> for F where
    F: Factory<R>,
    R: Resources, 
[src]

fn create_gtk_compatible_targets<CF, DF>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<RenderSurfaceWithDepth<R, CF, DF>> where
    CF: Formatted,
    CF::Channel: TextureChannel + RenderChannel,
    CF::Surface: RenderSurface + TextureSurface,
    DF: Formatted,
    DF::Channel: TextureChannel + RenderChannel,
    DF::Surface: DepthSurface + TextureSurface, 
[src]

fn create_msaa_pipeline_state<I: PipelineInit>(
    &mut self,
    aa: AaMode,
    vertex_shader: &[u8],
    pixel_shader: &[u8],
    init: I
) -> Result<PipelineState<R, I::Meta>, PipelineStateError<String>>
[src]

fn create_gtk_compatible_depth_target<D>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<DepthSurface<R, D>> where
    D: Formatted,
    D::Channel: TextureChannel + RenderChannel,
    D::Surface: DepthSurface + TextureSurface, 
[src]

fn create_gtk_compatible_render_target<F>(
    &mut self,
    aa: AaMode,
    width: Size,
    height: Size
) -> Result<RenderSurface<R, F>> where
    F: Formatted,
    F::Channel: TextureChannel + RenderChannel,
    F::Surface: RenderSurface + TextureSurface, 
[src]

Loading content...