pub struct VulkanImage { /* private fields */ }
Expand description

Provides a context for rendering an image on the GPU

Implementations§

source§

impl VulkanImage

source

pub fn new(width: usize, height: usize) -> Self

Create new Image on the GPU for GPU rendering, with the given size.

Trait Implementations§

source§

impl Drop for VulkanImage

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl ExportImage for VulkanImage

source§

fn get_size(&self) -> (usize, usize)

Returns the image size in pixels in the format (width, height)
source§

fn get_lightpower(&self) -> f32

Returns the lightpower of the scene most recently rendered to this image.
source§

fn to_rgbaf32(&self) -> Vec<f32>

Outputs the image. Serialsiing the image to a sequence of 32 bit floating point RGBA samples stored in a Vec<f32>, suitible for use in high bit depth images such as used by blender.
source§

fn to_rgba8(&self, rays: usize, exposure: f64, exponent: f32) -> Vec<u8>

Outputs the image. Serialsiing the image to a sequence of 8 bit RGB samples stored in a Vec<u8>, suitible for use in file streams and other outputs. Read more
source§

impl RenderImage for VulkanImage

source§

fn draw_line(&self, ray: RayResult)

Called in every rendering thread to add a Ray to the render target
source§

fn prepare_render(&mut self, lightpower: f32)

called momentarilly before the render begins to allow the render target to set it’s self up to receive calls to draw_line
source§

fn finish_render(&mut self)

called immediately after a render ends to allow the render target to clean up or finalize results

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V