Trait SCNProgramDelegate

Source
pub unsafe trait SCNProgramDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn program_bindValueForSymbol_atLocation_programID_renderer(
        &self,
        program: &SCNProgram,
        symbol: &NSString,
        location: c_uint,
        program_id: c_uint,
        renderer: &SCNRenderer,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn program_unbindValueForSymbol_atLocation_programID_renderer(
        &self,
        program: &SCNProgram,
        symbol: &NSString,
        location: c_uint,
        program_id: c_uint,
        renderer: &SCNRenderer,
    )
       where Self: Sized + Message { ... }
    unsafe fn program_handleError(&self, program: &SCNProgram, error: &NSError)
       where Self: Sized + Message { ... }
    unsafe fn programIsOpaque(&self, program: &SCNProgram) -> bool
       where Self: Sized + Message { ... }
}
Available on crate feature SCNShadable only.
Expand description

The SCNProgramDelegate protocol declares the methods that an instance of SCNProgram invokes to delegate the binding of parameters.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn program_bindValueForSymbol_atLocation_programID_renderer( &self, program: &SCNProgram, symbol: &NSString, location: c_uint, program_id: c_uint, renderer: &SCNRenderer, ) -> bool
where Self: Sized + Message,

👎Deprecated: Use -[SCNShadable handleBindingOfSymbol:usingBlock:] instead
Available on crate feature SCNRenderer only.

Invoked on the delegate to let it bind program values and/or also bind associated graphics resources (such as textures).

Parameter program: The program to bind values for.

Parameter symbol: The name of the symbol to bind a value for.

Parameter location: The location of the symbol within the program object to be modified.

Parameter programID: The program object.

Parameter renderer: The renderer that is currently rendering the scene.

Source

unsafe fn program_unbindValueForSymbol_atLocation_programID_renderer( &self, program: &SCNProgram, symbol: &NSString, location: c_uint, program_id: c_uint, renderer: &SCNRenderer, )
where Self: Sized + Message,

👎Deprecated: Use -[SCNShadable handleUnbindingOfSymbol:usingBlock:] instead
Available on crate feature SCNRenderer only.

Invoked on the delegate to let it unbind program values and/or also unbind associated graphic resources (such as textures).

Parameter program: The program to unbind values for.

Parameter symbol: The name of the symbol to unbind a value for.

Parameter location: The location of the symbol within the program object to be modified.

Parameter programID: The program object.

Parameter renderer: The renderer that is currently rendering the scene.

Source

unsafe fn program_handleError(&self, program: &SCNProgram, error: &NSError)
where Self: Sized + Message,

Invoked on the delegate whenever a compilation error occurs.

Error domain is SCNErrorDomain.

Parameter program: The program that generated a compilation error.

Parameter error: The compilation error.

Source

unsafe fn programIsOpaque(&self, program: &SCNProgram) -> bool
where Self: Sized + Message,

👎Deprecated: Use SCNProgram.opaque instead

The delegate should implement this mehod and return NO if the fragments generated by the program are not opaque.

Parameter program: The queried program.

This is deprecated. Use SCNProgram’s opaque property instead.

Trait Implementations§

Source§

impl ProtocolType for dyn SCNProgramDelegate

Source§

const NAME: &'static str = "SCNProgramDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn SCNProgramDelegate

Implementations on Foreign Types§

Source§

impl<T> SCNProgramDelegate for ProtocolObject<T>

Implementors§