Struct gfx_device_gl::Factory [] [src]

pub struct Factory {
    // some fields omitted
}

GL resource factory.

Methods

impl Factory
[src]

fn new(share: Rc<Share>) -> Factory

Create a new Factory.

fn get_main_frame_buffer(&self) -> FrameBuffer<R>

fn make_fake_output(&self, w: Size, h: Size) -> Output

Trait Implementations

impl Clone for Factory
[src]

fn clone(&self) -> Factory

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Factory<R> for Factory
[src]

type Mapper = RawMapping

Associated mapper type

fn get_capabilities(&self) -> &Capabilities

Returns the capabilities available to the specific API implementation

fn create_buffer_raw(&mut self, size: usize, role: BufferRole, usage: BufferUsage) -> RawBuffer<R>

fn create_buffer_static_raw(&mut self, data: &[u8], role: BufferRole) -> RawBuffer<R>

fn create_array_buffer(&mut self) -> Result<ArrayBuffer<R>, NotSupported>

fn create_shader(&mut self, stage: Stage, code: &[u8]) -> Result<Shader<R>, CreateShaderError>

fn create_program(&mut self, builder: &Builder<R>) -> Result<Program<R>, CreateProgramError>

fn create_frame_buffer(&mut self) -> Result<FrameBuffer<R>, NotSupported>

fn create_surface(&mut self, info: SurfaceInfo) -> Result<Surface<R>, SurfaceError>

fn create_texture(&mut self, info: TextureInfo) -> Result<Texture<R>, TextureError>

fn create_sampler(&mut self, info: SamplerInfo) -> Sampler<R>

fn update_buffer_raw(&mut self, buffer: &RawBuffer<R>, data: &[u8], offset_bytes: usize) -> Result<(), BufferUpdateError>

Update the information stored in a specific buffer

fn update_texture_raw(&mut self, texture: &Texture<R>, img: &ImageInfo, data: &[u8], kind_override: Option<Kind>) -> Result<(), TextureError>

Update the information stored in a texture

fn generate_mipmap(&mut self, texture: &Texture<R>)

fn map_buffer_raw(&mut self, buf: &RawBuffer<R>, access: MapAccess) -> RawMapping

fn unmap_buffer_raw(&mut self, map: RawMapping)

fn map_buffer_readable<T: Copy>(&mut self, buf: &Buffer<R, T>) -> Readable<T, RFactory>

fn map_buffer_writable<T: Copy>(&mut self, buf: &Buffer<R, T>) -> Writable<T, RFactory>

fn map_buffer_rw<T: Copy>(&mut self, buf: &Buffer<R, T>) -> RW<T, RFactory>

fn create_buffer_static<T>(&mut self, data: &[T], role: BufferRole) -> Buffer<R, T>

fn create_buffer_dynamic<T>(&mut self, num: usize, role: BufferRole) -> Buffer<R, T>

fn update_buffer<T>(&mut self, buf: &Buffer<R, T>, data: &[T], offset_elements: usize) -> Result<(), BufferUpdateError>

fn update_texture<T>(&mut self, tex: &Texture<R>, img: &ImageInfo, data: &[T], kind: Option<Kind>) -> Result<(), TextureError>

fn create_texture_static<T>(&mut self, info: TextureInfo, data: &[T]) -> Result<Texture<R>, TextureError>

Create a new texture with given data