Struct luminance_surfman::SurfmanSurface [−][src]
pub struct SurfmanSurface { /* fields omitted */ }
Implementations
impl SurfmanSurface
[src]
impl SurfmanSurface
[src]pub fn from_winit_window(
window: &Window,
shader_version: ShaderVersion
) -> Result<Self, SurfmanError>
[src]
window: &Window,
shader_version: ShaderVersion
) -> Result<Self, SurfmanError>
Create a surface from a winit window
⚠️ Warning: Because the surfman surface does not have access to the window event loop you will need to manualy call [
set_size
] on the surface when the window is resized.
pub fn back_buffer(
&mut self
) -> Result<Framebuffer<Glow, Dim2, (), ()>, SurfmanError>
[src]
&mut self
) -> Result<Framebuffer<Glow, Dim2, (), ()>, SurfmanError>
Get the back buffer
pub fn swap_buffers(&mut self) -> Result<(), SurfmanError>
[src]
Swap the front and back buffers
pub fn set_size(&mut self, size: [u32; 2]) -> Result<(), SurfmanError>
[src]
Set the size of the surface
Trait Implementations
impl Drop for SurfmanSurface
[src]
impl Drop for SurfmanSurface
[src]impl GraphicsContext for SurfmanSurface
[src]
impl GraphicsContext for SurfmanSurface
[src]type Backend = Glow
Internal type used by the backend to cache, optimize and store data. This roughly represents the GPU data / context a backend implementation needs to work correctly. Read more
fn backend(&mut self) -> &mut Self::Backend
[src]
pub fn new_pipeline_gate(&mut self) -> PipelineGate<'_, Self::Backend>
[src]
pub fn new_buffer<T>(
&mut self,
len: usize
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy + Default,
Self::Backend: Buffer<T>,
[src]
&mut self,
len: usize
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy + Default,
Self::Backend: Buffer<T>,
pub fn new_buffer_from_vec<T, X>(
&mut self,
vec: X
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
X: Into<Vec<T, Global>>,
Self::Backend: Buffer<T>,
[src]
&mut self,
vec: X
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
X: Into<Vec<T, Global>>,
Self::Backend: Buffer<T>,
pub fn new_buffer_repeating<T>(
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
Self::Backend: Buffer<T>,
[src]
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
Self::Backend: Buffer<T>,
pub fn new_framebuffer<D, CS, DS>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Framebuffer<Self::Backend, D, CS, DS>, FramebufferError> where
D: Dimensionable,
CS: ColorSlot<Self::Backend, D>,
DS: DepthSlot<Self::Backend, D>,
Self::Backend: Framebuffer<D>,
[src]
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Framebuffer<Self::Backend, D, CS, DS>, FramebufferError> where
D: Dimensionable,
CS: ColorSlot<Self::Backend, D>,
DS: DepthSlot<Self::Backend, D>,
Self::Backend: Framebuffer<D>,
pub fn new_shader_stage<R>(
&mut self,
ty: StageType,
src: R
) -> Result<Stage<Self::Backend>, StageError> where
R: AsRef<str>,
Self::Backend: Shader,
[src]
&mut self,
ty: StageType,
src: R
) -> Result<Stage<Self::Backend>, StageError> where
R: AsRef<str>,
Self::Backend: Shader,
pub fn new_shader_program<Sem, Out, Uni>(
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Sem: Semantics,
Self::Backend: Shader,
[src]
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Sem: Semantics,
Self::Backend: Shader,
pub fn new_tess(
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: Tess<(), (), (), Interleaved>,
[src]
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: Tess<(), (), (), Interleaved>,
pub fn new_deinterleaved_tess<V, W>(
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
Self::Backend: Tess<V, (), W, Deinterleaved>,
[src]
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
V: TessVertexData<Deinterleaved>,
W: TessVertexData<Deinterleaved>,
Self::Backend: Tess<V, (), W, Deinterleaved>,
pub fn new_texture<D, P>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
[src]
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
Auto Trait Implementations
impl !RefUnwindSafe for SurfmanSurface
impl !RefUnwindSafe for SurfmanSurface
impl !Send for SurfmanSurface
impl !Send for SurfmanSurface
impl !Sync for SurfmanSurface
impl !Sync for SurfmanSurface
impl Unpin for SurfmanSurface
impl Unpin for SurfmanSurface
impl !UnwindSafe for SurfmanSurface
impl !UnwindSafe for SurfmanSurface