Table of Contents

Class BindTexture

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Represents an operator that binds a buffer to the specified texture unit for each texture or notification in the sequence.

[Combinator]
[WorkflowElementCategory(ElementCategory.Sink)]
public class BindTexture
Inheritance
BindTexture
Inherited Members

Properties

Index

Gets or sets the index of the texture to be bound to the shader. Only applicable to texture array objects.

public int? Index { get; set; }

Property Value

int?

IndexSpecified

Gets a value indicating whether the Index property should be serialized.

[Browsable(false)]
public bool IndexSpecified { get; }

Property Value

bool

ShaderName

Gets or sets the name of the shader program.

[TypeConverter(typeof(ShaderNameConverter))]
public string ShaderName { get; set; }

Property Value

string

TextureName

Gets or sets the name of the texture to be bound to the shader.

[TypeConverter(typeof(TextureNameConverter))]
public string TextureName { get; set; }

Property Value

string

TextureSlot

Gets or sets a value specifying the slot on which to bind the texture.

public TextureUnit TextureSlot { get; set; }

Property Value

TextureUnit

TextureTarget

Gets or sets a value specifying the texture target to be bound to the sampler.

public TextureTarget TextureTarget { get; set; }

Property Value

TextureTarget

Methods

Process(IObservable<Texture>)

Binds each texture buffer in an observable sequence to the specified texture unit for each notification in an observable sequence.

public IObservable<Texture> Process(IObservable<Texture> source)

Parameters

source IObservable<Texture>

A sequence of Texture objects to be bound to the specified texture unit.

Returns

IObservable<Texture>

An observable sequence that is identical to the source sequence but where there is an additional side effect of binding the texture buffer objects in the sequence to the specified texture unit.

Remarks

If the TextureName property is specified, the corresponding texture buffer will be used instead of the values in the source sequence.

Process<TSource>(IObservable<TSource>)

Binds the specified texture buffer to the specified texture unit for each notification in an observable sequence.

public IObservable<TSource> Process<TSource>(IObservable<TSource> source)

Parameters

source IObservable<TSource>

The sequence containing the notifications indicating when to bind the texture buffer to the specified texture unit.

Returns

IObservable<TSource>

An observable sequence that is identical to the source sequence but where there is an additional side effect of binding the texture buffer to the specified texture unit.

Type Parameters

TSource

The type of the elements in the source sequence.