Struct luminance_glutin::GlutinSurface [−][src]
pub struct GlutinSurface { pub ctx: WindowedContext<PossiblyCurrent>, // some fields omitted }
Expand description
The Glutin surface.
You want to create such an object in order to use any luminance construct.
Fields
ctx: WindowedContext<PossiblyCurrent>
The windowed context.
Implementations
pub fn new_gl33_from_builders<'a, WB, CB>(
window_builder: WB,
ctx_builder: CB
) -> Result<(Self, EventLoop<()>), GlutinError> where
WB: FnOnce(&mut EventLoop<()>, WindowBuilder) -> WindowBuilder,
CB: FnOnce(&mut EventLoop<()>, ContextBuilder<'a, NotCurrent>) -> ContextBuilder<'a, NotCurrent>,
pub fn new_gl33_from_builders<'a, WB, CB>(
window_builder: WB,
ctx_builder: CB
) -> Result<(Self, EventLoop<()>), GlutinError> where
WB: FnOnce(&mut EventLoop<()>, WindowBuilder) -> WindowBuilder,
CB: FnOnce(&mut EventLoop<()>, ContextBuilder<'a, NotCurrent>) -> ContextBuilder<'a, NotCurrent>,
Create a new GlutinSurface
by consuming a [WindowBuilder
].
This is an alternative method to new_gl33
that is more flexible as you have access to the
whole glutin
types.
window_builder
is the default object when passed to your closure and ctx_builder
is
already initialized for the OpenGL context (you’re not supposed to change it!).
Create a new GlutinSurface
from scratch.
Get the underlying size (in physical pixels) of the surface.
This is equivalent to getting the inner size of the windowed context and converting it to a physical size by using the HiDPI factor of the windowed context.
Get access to the back buffer.
Swap the back and front buffers.
Trait Implementations
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
Access the query API.
Create a new pipeline gate
Create a new buffer. Read more
Create a new buffer from a slice. Read more
fn new_buffer_repeating<T>(
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
Self::Backend: Buffer<T>,
fn new_buffer_repeating<T>(
&mut self,
len: usize,
value: T
) -> Result<Buffer<Self::Backend, T>, BufferError> where
T: Copy,
Self::Backend: Buffer<T>,
Create a new buffer by repeating a value. Read more
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>,
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>,
Create a new framebuffer. Read more
Create a new shader stage. Read more
fn new_shader_program<Sem, Out, Uni>(
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Sem: Semantics,
Self::Backend: Shader,
fn new_shader_program<Sem, Out, Uni>(
&mut self
) -> ProgramBuilder<'_, Self, Sem, Out, Uni> where
Sem: Semantics,
Self::Backend: Shader,
Create a new shader program. Read more
fn new_tess(
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: Tess<(), (), (), Interleaved>,
fn new_tess(
&mut self
) -> TessBuilder<'_, Self::Backend, (), (), (), Interleaved> where
Self::Backend: Tess<(), (), (), Interleaved>,
Create a TessBuilder
. Read more
fn new_deinterleaved_tess<V, W>(
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
W: TessVertexData<Deinterleaved>,
V: TessVertexData<Deinterleaved>,
Self::Backend: Tess<V, (), W, Deinterleaved>,
fn new_deinterleaved_tess<V, W>(
&mut self
) -> TessBuilder<'_, Self::Backend, V, (), W, Deinterleaved> where
W: TessVertexData<Deinterleaved>,
V: TessVertexData<Deinterleaved>,
Self::Backend: Tess<V, (), W, Deinterleaved>,
Create a TessBuilder
with deinterleaved memory. Read more
fn new_texture_no_texels<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>,
fn new_texture_no_texels<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>,
Create a new texture by reserving space for texels. Read more
fn new_texture<D, P>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler,
gen_mipmaps: GenMipmaps,
texels: &[<P as Pixel>::Encoding]
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
fn new_texture<D, P>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler,
gen_mipmaps: GenMipmaps,
texels: &[<P as Pixel>::Encoding]
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
Create a new texture from texels. Read more
fn new_texture_raw<D, P>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler,
gen_mipmaps: GenMipmaps,
texels: &[<P as Pixel>::RawEncoding]
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
fn new_texture_raw<D, P>(
&mut self,
size: <D as Dimensionable>::Size,
mipmaps: usize,
sampler: Sampler,
gen_mipmaps: GenMipmaps,
texels: &[<P as Pixel>::RawEncoding]
) -> Result<Texture<Self::Backend, D, P>, TextureError> where
D: Dimensionable,
P: Pixel,
Self::Backend: Texture<D, P>,
Create a new texture from raw texels. Read more
Auto Trait Implementations
impl !RefUnwindSafe for GlutinSurface
impl !Send for GlutinSurface
impl !Sync for GlutinSurface
impl Unpin for GlutinSurface
impl !UnwindSafe for GlutinSurface