[−][src]Struct solstice::Context
Implementations
impl Context
[src]
pub fn new(ctx: Context) -> Self
[src]
pub fn enable(&mut self, feature: Feature)
[src]
pub fn disable(&mut self, feature: Feature)
[src]
pub fn new_debug_group(&self, message: &str) -> DebugGroup<'_>
[src]
pub fn new_buffer(
&mut self,
size: usize,
buffer_type: BufferType,
usage: Usage,
initial_data: Option<&[u8]>
) -> Result<BufferKey, GraphicsError>
[src]
&mut self,
size: usize,
buffer_type: BufferType,
usage: Usage,
initial_data: Option<&[u8]>
) -> Result<BufferKey, GraphicsError>
pub fn destroy_buffer(&mut self, buffer: &Buffer)
[src]
pub fn bind_buffer(&mut self, buffer_key: BufferKey, buffer_type: BufferType)
[src]
pub fn buffer_static_draw(&self, buffer: &Buffer, data: &[u8], offset: usize)
[src]
pub fn unmap_buffer(&mut self, map: &mut MappedBuffer)
[src]
pub fn new_shader(
&mut self,
vertex_source: &str,
fragment_source: &str
) -> Result<ShaderKey, ShaderError>
[src]
&mut self,
vertex_source: &str,
fragment_source: &str
) -> Result<ShaderKey, ShaderError>
pub fn get_shader_attributes(&self, shader: ShaderKey) -> Vec<Attribute>
[src]
pub fn get_shader_uniforms(&self, shader: ShaderKey) -> Vec<Uniform>
[src]
pub fn destroy_shader(&mut self, shader: ShaderKey)
[src]
pub fn use_shader<S: Shader + ?Sized>(&mut self, shader: Option<&S>)
[src]
pub fn new_texture(
&mut self,
texture_type: TextureType
) -> Result<TextureKey, GraphicsError>
[src]
&mut self,
texture_type: TextureType
) -> Result<TextureKey, GraphicsError>
pub fn destroy_texture(&mut self, texture_key: TextureKey)
[src]
pub fn bind_texture_to_unit(
&mut self,
texture_type: TextureType,
texture_key: TextureKey,
texture_unit: TextureUnit
)
[src]
&mut self,
texture_type: TextureType,
texture_key: TextureKey,
texture_unit: TextureUnit
)
pub fn new_framebuffer(&mut self) -> Result<FramebufferKey, GraphicsError>
[src]
pub fn destroy_framebuffer(&mut self, framebuffer_key: FramebufferKey)
[src]
pub fn bind_framebuffer(
&mut self,
target: Target,
framebuffer_key: Option<FramebufferKey>
)
[src]
&mut self,
target: Target,
framebuffer_key: Option<FramebufferKey>
)
pub fn check_framebuffer_status(&self, target: Target) -> Status
[src]
pub fn get_active_framebuffer(&self, target: Target) -> Option<FramebufferKey>
[src]
pub fn framebuffer_texture(
&mut self,
target: Target,
attachment: Attachment,
texture_type: TextureType,
texture_key: TextureKey,
level: u32
)
[src]
&mut self,
target: Target,
attachment: Attachment,
texture_type: TextureType,
texture_key: TextureKey,
level: u32
)
pub fn set_vertex_attributes(
&mut self,
desired: u32,
binding_info: &[Option<BindingInfo<'_>>]
)
[src]
&mut self,
desired: u32,
binding_info: &[Option<BindingInfo<'_>>]
)
pub fn set_uniform_by_location(
&self,
location: &UniformLocation,
data: &RawUniformValue
)
[src]
&self,
location: &UniformLocation,
data: &RawUniformValue
)
pub fn draw_arrays(&self, mode: DrawMode, first: i32, count: i32)
[src]
pub fn draw_elements(
&self,
mode: DrawMode,
count: i32,
element_type: u32,
offset: i32
)
[src]
&self,
mode: DrawMode,
count: i32,
element_type: u32,
offset: i32
)
pub fn draw_arrays_instanced(
&self,
mode: DrawMode,
first: i32,
count: i32,
instance_count: i32
)
[src]
&self,
mode: DrawMode,
first: i32,
count: i32,
instance_count: i32
)
pub fn draw_elements_instanced(
&self,
mode: DrawMode,
count: i32,
element_type: u32,
offset: i32,
instance_count: i32
)
[src]
&self,
mode: DrawMode,
count: i32,
element_type: u32,
offset: i32,
instance_count: i32
)
pub fn set_viewport(&mut self, x: i32, y: i32, width: i32, height: i32)
[src]
pub fn viewport(&self) -> Viewport<i32>
[src]
pub fn clear_color(&self, red: f32, green: f32, blue: f32, alpha: f32)
[src]
pub fn clear(&self)
[src]
pub fn read_pixels(
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: PixelFormat,
data: &mut [u8]
)
[src]
&self,
x: i32,
y: i32,
width: i32,
height: i32,
format: PixelFormat,
data: &mut [u8]
)
pub fn debug_message_callback<F>(&self, callback: F) where
F: FnMut(DebugSource, DebugType, u32, DebugSeverity, &str),
[src]
F: FnMut(DebugSource, DebugType, u32, DebugSeverity, &str),
Trait Implementations
impl Drop for Context
[src]
impl Renderer for Context
[src]
fn clear(&mut self, settings: ClearSettings<'_>)
[src]
fn draw<S: ?Sized, M>(
&mut self,
shader: &S,
geometry: &Geometry<M>,
settings: PipelineSettings<'_>
) where
S: Shader,
M: Mesh,
[src]
&mut self,
shader: &S,
geometry: &Geometry<M>,
settings: PipelineSettings<'_>
) where
S: Shader,
M: Mesh,
impl TextureUpdate for Context
[src]
fn set_texture_sub_data(
&mut self,
texture_key: TextureKey,
texture: TextureInfo,
texture_type: TextureType,
data: &[u8],
x_offset: u32,
y_offset: u32
)
[src]
&mut self,
texture_key: TextureKey,
texture: TextureInfo,
texture_type: TextureType,
data: &[u8],
x_offset: u32,
y_offset: u32
)
fn set_texture_data(
&mut self,
texture_key: TextureKey,
texture: TextureInfo,
texture_type: TextureType,
data: Option<&[u8]>
)
[src]
&mut self,
texture_key: TextureKey,
texture: TextureInfo,
texture_type: TextureType,
data: Option<&[u8]>
)
fn set_texture_wrap(
&mut self,
texture_key: TextureKey,
texture_type: TextureType,
wrap: Wrap
)
[src]
&mut self,
texture_key: TextureKey,
texture_type: TextureType,
wrap: Wrap
)
fn set_texture_filter(
&mut self,
texture_key: TextureKey,
texture_type: TextureType,
filter: Filter
)
[src]
&mut self,
texture_key: TextureKey,
texture_type: TextureType,
filter: Filter
)
Auto Trait Implementations
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,