Struct LegacyRenderPass

pub struct LegacyRenderPass(/* private fields */);
Expand description

Legacy Render Pass is phased out in favor of specialized render passes that perform individual operations, which are combined in a Legacy Render Pass into a single render pass.

See: BlitRenderPass, ClearRenderPass, CompositionTargetRenderPass, DrawObjectsRenderPass, PipelineStateRenderPass

Implementations§

§

impl LegacyRenderPass

pub fn create( domain: &Domain, name: impl AsRef<KanziStr>, ) -> Result<LegacyRenderPass, Error>

Create a render pass.

§Arguments
  • domain - Domain to use.
  • name - Render pass name.
§Returns

Newly created render pass.

§

impl LegacyRenderPass

pub fn get_flush_after_render(&self) -> Result<bool, Error>

pub fn set_flush_after_render(&self, value: bool) -> Result<(), Error>

pub fn get_render_pass_camera(&self) -> Result<KanziString, Error>

pub fn set_render_pass_camera( &self, value: impl AsRef<KanziStr>, ) -> Result<(), Error>

pub fn get_render_pass_object_source( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_object_source( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_material(&self) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_material( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_render_target_color0( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_render_target_color0( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_render_target_color1( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_render_target_color1( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_render_target_color2( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_render_target_color2( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_render_target_color3( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_render_target_color3( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_render_pass_render_target_depth_stencil( &self, ) -> Result<Option<Weak<Resource>>, Error>

pub fn set_render_pass_render_target_depth_stencil( &self, value: Option<&Resource>, ) -> Result<(), Error>

pub fn get_frustum_culling_on(&self) -> Result<bool, Error>

pub fn set_frustum_culling_on(&self, value: bool) -> Result<(), Error>

pub fn get_cull_mode(&self) -> Result<GraphicsCullMode, Error>

pub fn set_cull_mode(&self, value: GraphicsCullMode) -> Result<(), Error>

pub fn get_render_once(&self) -> Result<bool, Error>

pub fn set_render_once(&self, value: bool) -> Result<(), Error>

pub fn get_color0_integer_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color0_integer_clear_value( &self, value: Vector4, ) -> Result<(), Error>

pub fn get_color0_float_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color0_float_clear_value(&self, value: Vector4) -> Result<(), Error>

pub fn get_color1_integer_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color1_integer_clear_value( &self, value: Vector4, ) -> Result<(), Error>

pub fn get_color1_float_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color1_float_clear_value(&self, value: Vector4) -> Result<(), Error>

pub fn get_color2_integer_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color2_integer_clear_value( &self, value: Vector4, ) -> Result<(), Error>

pub fn get_color2_float_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color2_float_clear_value(&self, value: Vector4) -> Result<(), Error>

pub fn get_color3_integer_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color3_integer_clear_value( &self, value: Vector4, ) -> Result<(), Error>

pub fn get_color3_float_clear_value(&self) -> Result<Vector4, Error>

pub fn set_color3_float_clear_value(&self, value: Vector4) -> Result<(), Error>

pub fn get_color_buffer_clear_color(&self) -> Result<ColorRGBA, Error>

pub fn set_color_buffer_clear_color( &self, value: ColorRGBA, ) -> Result<(), Error>

pub fn get_color1_color_clear_value(&self) -> Result<ColorRGBA, Error>

pub fn set_color1_color_clear_value( &self, value: ColorRGBA, ) -> Result<(), Error>

pub fn get_color2_color_clear_value(&self) -> Result<ColorRGBA, Error>

pub fn set_color2_color_clear_value( &self, value: ColorRGBA, ) -> Result<(), Error>

pub fn get_color3_color_clear_value(&self) -> Result<ColorRGBA, Error>

pub fn set_color3_color_clear_value( &self, value: ColorRGBA, ) -> Result<(), Error>

pub fn get_color_buffer_clear_enabled(&self) -> Result<bool, Error>

pub fn set_color_buffer_clear_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_color_write_mode(&self) -> Result<GraphicsColorWriteMode, Error>

pub fn set_color_write_mode( &self, value: GraphicsColorWriteMode, ) -> Result<(), Error>

pub fn get_depth_buffer_clear_enabled(&self) -> Result<bool, Error>

pub fn set_depth_buffer_clear_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_depth_buffer_clear_value(&self) -> Result<f32, Error>

pub fn set_depth_buffer_clear_value(&self, value: f32) -> Result<(), Error>

pub fn get_depth_buffer_test_enabled(&self) -> Result<bool, Error>

pub fn set_depth_buffer_test_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_depth_buffer_write_enabled(&self) -> Result<bool, Error>

pub fn set_depth_buffer_write_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_stencil_buffer_clear_enabled(&self) -> Result<bool, Error>

pub fn set_stencil_buffer_clear_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_stencil_buffer_clear_value(&self) -> Result<i32, Error>

pub fn set_stencil_buffer_clear_value(&self, value: i32) -> Result<(), Error>

pub fn get_stencil_fail_operation( &self, ) -> Result<GraphicsStencilOperation, Error>

pub fn set_stencil_fail_operation( &self, value: GraphicsStencilOperation, ) -> Result<(), Error>

pub fn get_stencil_pass_depth_fail_operation( &self, ) -> Result<GraphicsStencilOperation, Error>

pub fn set_stencil_pass_depth_fail_operation( &self, value: GraphicsStencilOperation, ) -> Result<(), Error>

pub fn get_stencil_pass_depth_pass_operation( &self, ) -> Result<GraphicsStencilOperation, Error>

pub fn set_stencil_pass_depth_pass_operation( &self, value: GraphicsStencilOperation, ) -> Result<(), Error>

pub fn get_stencil_function(&self) -> Result<GraphicsCompareFunction, Error>

pub fn set_stencil_function( &self, value: GraphicsCompareFunction, ) -> Result<(), Error>

pub fn get_stencil_function_reference_value(&self) -> Result<i32, Error>

pub fn set_stencil_function_reference_value( &self, value: i32, ) -> Result<(), Error>

pub fn get_stencil_function_reference_mask(&self) -> Result<i32, Error>

pub fn set_stencil_function_reference_mask( &self, value: i32, ) -> Result<(), Error>

pub fn get_stencil_buffer_test_enabled(&self) -> Result<bool, Error>

pub fn set_stencil_buffer_test_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_render_pass_scissor_enabled(&self) -> Result<bool, Error>

pub fn set_render_pass_scissor_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_render_pass_scissor_x(&self) -> Result<f32, Error>

pub fn set_render_pass_scissor_x(&self, value: f32) -> Result<(), Error>

pub fn get_render_pass_scissor_y(&self) -> Result<f32, Error>

pub fn set_render_pass_scissor_y(&self, value: f32) -> Result<(), Error>

pub fn get_render_pass_scissor_width(&self) -> Result<f32, Error>

pub fn set_render_pass_scissor_width(&self, value: f32) -> Result<(), Error>

pub fn get_render_pass_scissor_height(&self) -> Result<f32, Error>

pub fn set_render_pass_scissor_height(&self, value: f32) -> Result<(), Error>

pub fn get_render_pass_scissor_type( &self, ) -> Result<KzuViewportCoordinateType, Error>

pub fn set_render_pass_scissor_type( &self, value: KzuViewportCoordinateType, ) -> Result<(), Error>

pub fn get_render_pass_render_target_mipmap_level(&self) -> Result<i32, Error>

pub fn set_render_pass_render_target_mipmap_level( &self, value: i32, ) -> Result<(), Error>

pub fn get_render_pass_render_target_generate_mipmap( &self, ) -> Result<bool, Error>

pub fn set_render_pass_render_target_generate_mipmap( &self, value: bool, ) -> Result<(), Error>

pub fn get_render_pass_render_target_resolve(&self) -> Result<bool, Error>

pub fn set_render_pass_render_target_resolve( &self, value: bool, ) -> Result<(), Error>

pub fn get_render_pass_render_target_invalidate_attachments( &self, ) -> Result<InvalidateAttachments, Error>

pub fn set_render_pass_render_target_invalidate_attachments( &self, value: InvalidateAttachments, ) -> Result<(), Error>

pub fn get_composer_enabled(&self) -> Result<bool, Error>

pub fn set_composer_enabled(&self, value: bool) -> Result<(), Error>

pub fn get_viewport_x(&self) -> Result<f32, Error>

pub fn set_viewport_x(&self, value: f32) -> Result<(), Error>

pub fn get_viewport_y(&self) -> Result<f32, Error>

pub fn set_viewport_y(&self, value: f32) -> Result<(), Error>

pub fn get_viewport_width(&self) -> Result<f32, Error>

pub fn set_viewport_width(&self, value: f32) -> Result<(), Error>

pub fn get_viewport_height(&self) -> Result<f32, Error>

pub fn set_viewport_height(&self, value: f32) -> Result<(), Error>

pub fn get_viewport_type(&self) -> Result<KzuViewportCoordinateType, Error>

pub fn set_viewport_type( &self, value: KzuViewportCoordinateType, ) -> Result<(), Error>

Methods from Deref<Target = RenderPass>§

Methods from Deref<Target = Resource>§

pub fn get_name(&self) -> Result<KanziString, Error>

Gets the resource name.

pub fn get_url(&self) -> Result<KanziString, Error>

Gets the resource URL. Note that the URL is not necessarily in URL form if resource has been just created.

§Returns

URL string.

pub fn set_keep_alive(&self, keep_alive: bool) -> Result<(), Error>

Sets the keep alive flag. Can be set only before the resource is registered to the resource manager. Normally set by loadFromKZB.

§Arguments
  • keep_alive - Value for the keep alive flag.

Methods from Deref<Target = Object>§

pub fn as_ptr(&self) -> *mut ObjectWrapper

pub fn as_wrapper(&self) -> &ObjectWrapper

pub fn as_object(&self) -> &Object

Represents any type inheriting from Object as &Object. This is useful for comparisions when PartialEq traits failed to compare objects of different types.

let child = screen.get_child(0)?;
let parent = child.get_parent()?.into_error(ErrorKind::ObjectNotFound)?;
// assert_eq!(screen, parent); // <- Fails to compile!
assert_eq!(screen.as_object(), parent.as_object());

pub fn get_native(&self) -> Result<NonNull<c_void>, Error>

Gets a pointer to the backing C++ instance.

pub fn is_stale(&self) -> bool

Checks whether the weak reference has expired.

pub fn get_property<T>( &self, property_type: &PropertyType<T>, ) -> Result<<T as VariantConstraint>::RetArg, Error>

Returns the current value of a property disregarding modifiers.

Base value is affected by the following inputs where the highest entry in the list determines the base value:

  1. Local value set with setProperty or loaded from kzb
  2. Value set by a style affecting the property.
  3. Value defined by class metadata.

Modifiers are not applied, the highest-priority base value is returned.

If no inputs to the property value can be established the system returns the value default value from property type metadata.

§Arguments
  • property_type - The property type identifying the property to retrieve.
§Returns

The evaluated property value.

pub fn get_optional_property<T>( &self, property_type: &PropertyType<T>, ) -> Result<Option<<T as VariantConstraint>::RetArg>, Error>

Returns the current value of a property disregarding modifiers, but does not default to the value in property metadata if there are no inputs to the property value.

If there is no value sources, None is returned.

If no inputs to the property value can be established the system returns the value default value from property type metadata.

§Arguments
  • property_type - The property type identifying the property to retrieve.
§Returns

The evaluated property value.

pub fn set_property<T>( &self, property_type: &PropertyType<T>, value: <T as VariantConstraint>::DataArg<'_>, ) -> Result<(), Error>

Sets the local value of a property type.

pub fn has_value<T>( &self, property_type: &PropertyType<T>, ) -> Result<bool, Error>

Evaluates whether there are any inputs into the property value. Both value sources and modifiers are taken into account.

§Returns

Returns true if there are inputs into the property value, false otherwise.

pub fn remove_local_value<T>( &self, property_type: &PropertyType<T>, ) -> Result<(), Error>

Removes the local value associated with the property.

pub fn get_metaclass(&self) -> Result<Metaclass, Error>

Returns the metaclass of the dynamic type of the object.

pub fn get_domain(&self) -> Result<Domain, Error>

Returns the domain the object belongs to.

pub fn set_flag_keep_during_patching<T>( &self, property_type: &PropertyType<T>, ) -> Result<(), Error>

Sets the flag to indicate that the property was loaded from KZB.

pub fn debug_string(&self) -> Result<String, Error>

Builds a string representation of the object intended for debugging purposes.

Trait Implementations§

§

impl Clone for LegacyRenderPass

§

fn clone(&self) -> LegacyRenderPass

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl ConcreteObjectConstraint for LegacyRenderPass

§

fn create_instance( domain: &Domain, name: impl AsRef<KanziStr>, ) -> Result<Self, Error>

§

impl Debug for LegacyRenderPass

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Deref for LegacyRenderPass

§

type Target = RenderPass

The resulting type after dereferencing.
§

fn deref(&self) -> &<LegacyRenderPass as Deref>::Target

Dereferences the value.
§

impl Inheritable for LegacyRenderPass

§

unsafe fn downcast_unchecked<T>(self) -> T
where T: Inherits<Self>,

Downcast the object to a more specific type. Read more
§

unsafe fn downcast_unchecked_ref<T>(&self) -> &T
where T: Inherits<Self>,

Downcast the object reference to a more specific type. Read more
§

impl Inherits<Object> for LegacyRenderPass

§

fn upcast(self) -> Base

§

fn upcast_ref(&self) -> &Base

§

impl Inherits<RenderPass> for LegacyRenderPass

§

fn upcast(self) -> Base

§

fn upcast_ref(&self) -> &Base

§

impl Inherits<Resource> for LegacyRenderPass

§

fn upcast(self) -> Base

§

fn upcast_ref(&self) -> &Base

§

impl MetaclassConstraint for LegacyRenderPass

§

fn get_static_metaclass() -> &'static Metaclass

Gets metaclass associated with a given type.
§

impl ObjectConstraint for LegacyRenderPass

§

fn downcast<T>(self) -> Result<Option<T>, Error>
where T: MetaInherits<Self>,

Casts metaclass to a more specific type by value.
§

fn downcast_ref<T>(&self) -> Result<Option<&T>, Error>
where T: MetaInherits<Self>,

Casts metaclass to a more specific type by reference.
§

fn is_a<T>(&self) -> Result<bool, Error>
where T: MetaInherits<Self>,

Determines whether the class this metaclass describes derives from a class described by specified metaclass.
§

fn downgrade(self) -> Weak<Self>

§

fn downgrade_ref(&self) -> Weak<Self>

§

fn lock(self) -> ThreadObject<Self>

§

fn lock_ref(&self) -> ThreadObject<Self>

§

impl<T> PartialEq<T> for LegacyRenderPass

§

fn eq(&self, rhs: &T) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl<T> PartialEq<Weak<T>> for LegacyRenderPass

§

fn eq(&self, rhs: &Weak<T>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for LegacyRenderPass

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
§

impl<T> AsAny for T
where T: 'static,

§

fn as_any(&self) -> &(dyn Any + 'static)

§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Inherits<T> for T

§

fn upcast(self) -> Base

§

fn upcast_ref(&self) -> &Base

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

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>,

Source§

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.
§

impl<Base, T> MetaInherits<Base> for T
where Base: ObjectConstraint, T: Inherits<Base> + ObjectConstraint,