Struct rin::scene::renderer::light::LightAsCameraUBO [−][src]
pub struct LightAsCameraUBO { pub ubo: Buffer<LightAsCameraData>, }
Fields
ubo: Buffer<LightAsCameraData>
Implementations
impl LightAsCameraUBO
[src]
impl LightAsCameraUBO
[src]pub fn from_directional(
gl: &Renderer<'_, Screen>,
light_pos: Point<f32, U3>,
light_mats: &DirectionalLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView,
usage: u32
) -> LightAsCameraUBO
[src]
gl: &Renderer<'_, Screen>,
light_pos: Point<f32, U3>,
light_mats: &DirectionalLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView,
usage: u32
) -> LightAsCameraUBO
pub fn from_spot(
gl: &Renderer<'_, Screen>,
light_pos: Point<f32, U3>,
light_mats: &SpotLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView,
usage: u32
) -> LightAsCameraUBO
[src]
gl: &Renderer<'_, Screen>,
light_pos: Point<f32, U3>,
light_mats: &SpotLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView,
usage: u32
) -> LightAsCameraUBO
pub fn update_directional(
&mut self,
dynamic: bool,
light_pos: Point<f32, U3>,
light_mats: &DirectionalLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView
)
[src]
&mut self,
dynamic: bool,
light_pos: Point<f32, U3>,
light_mats: &DirectionalLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView
)
pub fn update_spot(
&mut self,
dynamic: bool,
light_pos: Point<f32, U3>,
light_mats: &SpotLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView
)
[src]
&mut self,
dynamic: bool,
light_pos: Point<f32, U3>,
light_mats: &SpotLightMatrices,
shadow_map: &Parameters,
gpu_shadow_map: &ShadowMapView
)
Methods from Deref<Target = Buffer<LightAsCameraData>>
pub fn load(&mut self, data: &[T], usage: u32)
[src]
Loads the passed data into the buffer (re)allocating it
see: gl(Named)BufferData
pub fn load_target(&mut self, data: &[T], usage: u32, target: u32)
[src]
Loads the passed data into the buffer (re)allocating it to an specific target
see: gl(Named)BufferData
pub fn reserve(&mut self, len: usize, usage: u32)
[src]
Reserves len amount of memory into the buffer (re)allocating it
see: gl(Named)BufferData
pub fn reserve_target(&mut self, len: usize, usage: u32, target: u32)
[src]
Reserves len amount of memory into the buffer (re)allocating it to an specific target
see: gl(Named)BufferData
pub fn update(&mut self, data: &[T])
[src]
Loads the passed data at the beginning of the buffer
Will panic if the buffer is not big enough or not allocated at all
see: gl(Named)BufferSubData
pub fn map_read(
&mut self,
flags: MapReadFlags
) -> Result<MapRead<'_, T, Buffer<T>>, Error>
[src]
&mut self,
flags: MapReadFlags
) -> Result<MapRead<'_, T, Buffer<T>>, Error>
Maps a buffer object’s data store
Pass a closure that receives the mapped buffer to access it
see glMapBuffer
pub fn map_write(
&mut self,
flags: MapWriteFlags
) -> Result<MapWrite<'_, T, Buffer<T>>, Error>
[src]
&mut self,
flags: MapWriteFlags
) -> Result<MapWrite<'_, T, Buffer<T>>, Error>
Maps a buffer object’s data store
Pass a closure that receives the mapped buffer to access it
see glMapBuffer
pub fn map_read_write(
&mut self,
flags: MapReadWriteFlags
) -> Result<MapReadWrite<'_, T, Buffer<T>>, Error>
[src]
&mut self,
flags: MapReadWriteFlags
) -> Result<MapReadWrite<'_, T, Buffer<T>>, Error>
Maps a buffer object’s data store
Pass a closure that receives the mapped buffer to access it
see glMapBuffer
pub unsafe fn map_read_slice(&self, flags: MapReadFlags) -> Result<&[T], Error>
[src]
Maps a buffer object’s data store as a slice
This operation is unsafe cause the buffer needs to be unmapped manually so it could be accessed while mapped which is undefined behaviour
see glMapBuffer
pub unsafe fn map_write_slice(
&mut self,
flags: MapWriteFlags
) -> Result<&mut [T], Error>
[src]
&mut self,
flags: MapWriteFlags
) -> Result<&mut [T], Error>
Maps a buffer object’s data store as a slice
This operation is unsafe cause the buffer needs to be unmapped manually so it could be accessed while mapped which is undefined behaviour
see glMapBuffer
pub unsafe fn map_read_write_slice(
&mut self,
flags: MapReadWriteFlags
) -> Result<&mut [T], Error>
[src]
&mut self,
flags: MapReadWriteFlags
) -> Result<&mut [T], Error>
Maps a buffer object’s data store as a slice
This operation is unsafe cause the buffer needs to be unmapped manually so it could be accessed while mapped which is undefined behaviour
see glMapBuffer
pub unsafe fn unmap(&mut self)
[src]
pub fn copy_to<U, B>(&self, dst: &mut B) where
B: BufferRange<U> + WithBackendMut,
[src]
B: BufferRange<U> + WithBackendMut,
Copy one buffer into another
pub fn len(&self) -> usize
[src]
Number of elements on the last update
pub fn is_empty(&self) -> bool
[src]
If there’s no elements loaded in the buffer
This is len == 0 not capacity == 0
pub fn capacity(&self) -> usize
[src]
Allocated capacity of the buffer in number of elements
pub fn bytes(&self) -> usize
[src]
Total bytes on the last update
pub fn capacity_bytes(&self) -> usize
[src]
Total capcacity of the buffer in bytes
pub fn id(&self) -> u32
[src]
OpenGL id
pub fn stride(&self) -> usize
[src]
Stride of the buffer type
pub fn range<R>(&self, range: R) -> Range<T, Buffer<T>, &Buffer<T>> where
R: InputRange,
[src]
R: InputRange,
Get a range from the buffer
Useful to do operations on portions of the buffer
Panics if the range is out of bounds
pub fn range_mut<R>(&mut self, range: R) -> Range<T, Buffer<T>, &mut Buffer<T>> where
R: InputRange,
[src]
R: InputRange,
Get a mutable range from the buffer
Useful to do operations on portions of the buffer
Panics if the range is out of bounds
Trait Implementations
impl Component for LightAsCameraUBO
[src]
impl Component for LightAsCameraUBO
[src]type Storage = _DenseOneToNVec<LightAsCameraUBO, Group>
type MutStorageCacheGuard = ()
pub fn type_name() -> &'static str
[src]
pub fn is_reference() -> bool
[src]
pub fn id() -> TypeId
[src]
pub fn references_other(
) -> Option<Box<dyn Fn(&Storages, &Entity) + 'static, Global>>
[src]
) -> Option<Box<dyn Fn(&Storages, &Entity) + 'static, Global>>
impl Debug for LightAsCameraUBO
[src]
impl Debug for LightAsCameraUBO
[src]impl<'a> DebugParameter for LightAsCameraUBO
[src]
impl<'a> DebugParameter for LightAsCameraUBO
[src]pub fn debug<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
[src]
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
impl Deref for LightAsCameraUBO
[src]
impl Deref for LightAsCameraUBO
[src]type Target = Buffer<LightAsCameraData>
The resulting type after dereferencing.
pub fn deref(&self) -> &Buffer<LightAsCameraData>
[src]
impl DerefMut for LightAsCameraUBO
[src]
impl DerefMut for LightAsCameraUBO
[src]pub fn deref_mut(&mut self) -> &mut Buffer<LightAsCameraData>
[src]
impl OneToNComponent for LightAsCameraUBO
[src]
impl OneToNComponent for LightAsCameraUBO
[src]pub fn slice_type_name() -> &'static str
[src]
Auto Trait Implementations
impl !RefUnwindSafe for LightAsCameraUBO
impl !Send for LightAsCameraUBO
impl !Sync for LightAsCameraUBO
impl Unpin for LightAsCameraUBO
impl !UnwindSafe for LightAsCameraUBO
Blanket Implementations
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
[src]pub fn to_subset(&self) -> Option<SS>
[src]
pub fn is_in_subset(&self) -> bool
[src]
pub fn to_subset_unchecked(&self) -> SS
[src]
pub fn from_subset(element: &SS) -> SP
[src]
impl<C> ComponentThreadLocal for C where
C: Component,
[src]
C: Component,