Inherits from NSObject
Conforms to NGLIterator
NGLShaders
NSFastEnumeration
Declared in NGLShadersMulti.h

Overview

Multi/Sub instance of NGLShaders.

NGLShadersMulti is a special kind of NGLShaders and represents a collection of multiple shaders. It allows you to create many shaders onto one single mesh. So you can use many behaviors using the same mesh instance.

Tasks

Class Methods

shadersMultiWithShaders:

Returns an autorelease instance of NGLShadersMulti.

+ (id)shadersMultiWithShaders:(NGLShaders *)first

Parameters

first

The first shaders to be added.

Return Value

A NGLShadersMulti autoreleased instance.

Discussion

Returns an autorelease instance of NGLShadersMulti.

This method creates a shader library with one shaders inside of it.

See Also

Declared In

NGLShadersMulti.h

Instance Methods

addNGLShadersMulti:copyItems:

Adds a set of NGLShaders instances to this shader library.

- (void)addNGLShadersMulti:(NGLShadersMulti *)multi copyItems:(BOOL)flag

Parameters

multi

A NGLShadersMulti instance.

flag

Specifies if the new items will be copied or just retained.

Discussion

Adds a set of NGLShaders instances to this shader library.

Just as the addShaders: method, every NGLShaders will be internally retained.

See Also

Declared In

NGLShadersMulti.h

addShaders:

Adds a NGLShaders instance to this shaders library.

- (void)addShaders:(NGLShaders *)item

Parameters

item

The NGLShaders instance to add.

Discussion

Adds a NGLShaders instance to this shaders library.

The NGLShaders instance will be internally retained.

See Also

Declared In

NGLShadersMulti.h

count

Returns the number of instances in this library at the moment.

- (unsigned int)count

Return Value

An unsigned int data type.

Discussion

Returns the number of instances in this library at the moment.

Declared In

NGLShadersMulti.h

hasShaders:

Checks if a shaders exists in this library.

- (BOOL)hasShaders:(NGLShaders *)item

Parameters

item

The NGLShaders to search for.

Discussion

Checks if a shaders exists in this library.

See Also

Declared In

NGLShadersMulti.h

initWithShaders:

Initiates a shaders library based on many NGLShaders instances.

- (id)initWithShaders:(NGLShaders *)first, ...

Parameters

first

The first shaders to be added.

...

A sequence of NGLShaders instances separated by comma. This method requires a nil termination.

Return Value

A NGLShadersMulti instance.

Discussion

Initiates a shaders library based on many NGLShaders instances.

This method initializes a shader library and puts many shaders into it.

See Also

Declared In

NGLShadersMulti.h

initWithShadersKind:

Initiates a shaders library based NGLShaders protocol.

- (id)initWithShadersKind:(id<NGLShaders>)shaders

Parameters

shaders

An object that conforms with the NGLShaders protocol.

Return Value

A NGLShadersMulti instance.

Discussion

Initiates a shaders library based NGLShaders protocol.

This method will check if the informed object is a simple NGLShaders or a NGLShadersMulti and will automatically retain its items.

See Also

Declared In

NGLShadersMulti.h

removeAll

Removes all shaders in this library. All the shaders will receive a release message.

- (void)removeAll

Discussion

Removes all shaders in this library. All the shaders will receive a release message.

If there is no shader in this library, this method does nothing.

Declared In

NGLShadersMulti.h

shadersWithIdentifier:

Returns a shaders by its identifier.

- (NGLShaders *)shadersWithIdentifier:(unsigned int)identifier

Parameters

identifier

The identifier to search for.

Return Value

The pointer to the object in this library.

Discussion

Returns a shaders by its identifier.

This method returns a NGLShaders. If the identifier was not found, then this method returns nil. If more than one shader has the same identifier, only the first occurence will be returned.

See Also

Declared In

NGLShadersMulti.h