pub struct RenderTarget {
pub is_empty: bool,
pub width: u32,
pub height: u32,
pub texture_id: u32,
pub texture_width: u32,
pub texture_height: u32,
pub texture_format: BitmapFormat,
pub uv_coords: Rect<f32>,
pub render_buffer_id: u32,
}Expand description
Rendering details for a View, to be used with your own GPUDriver
When using your own GpuDriver, each
View is rendered to an offscreen texture that you can
display on a 3D quad in your application. This struct provides all the
details you need to display the corresponding texture in your application.
Fields§
§is_empty: boolWhether this target is empty (null texture)
width: u32The viewport width (in device coordinates).
height: u32The viewport height (in device coordinates).
texture_id: u32The GPUDriver-specific texture ID (the texture will be created
in GpuDriver::create_texture).
texture_width: u32The texture width (in pixels). This may be padded.
texture_height: u32The texture height (in pixels). This may be padded.
texture_format: BitmapFormatThe pixel format of the texture.
uv_coords: Rect<f32>UV coordinates of the texture (this is needed because the texture may be padded).
render_buffer_id: u32The GPUDriver-specific render buffer ID (the render buffer will be created
in GpuDriver::create_render_buffer).
Trait Implementations§
Source§impl Clone for RenderTarget
impl Clone for RenderTarget
Source§fn clone(&self) -> RenderTarget
fn clone(&self) -> RenderTarget
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RenderTarget
impl Debug for RenderTarget
Source§impl From<ULRenderTarget> for RenderTarget
impl From<ULRenderTarget> for RenderTarget
Source§fn from(rt: ULRenderTarget) -> Self
fn from(rt: ULRenderTarget) -> Self
impl Copy for RenderTarget
Auto Trait Implementations§
impl Freeze for RenderTarget
impl RefUnwindSafe for RenderTarget
impl Send for RenderTarget
impl Sync for RenderTarget
impl Unpin for RenderTarget
impl UnwindSafe for RenderTarget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
Source§unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
unsafe fn read<F, E>(size: usize, f: F) -> Result<T, E>
Owned.
User-provided closure F must only write to and not read from &mut Self.