Inherits from NSObject
Conforms to NSCopying
Declared in CCRenderer.h

Overview

A render state encapsulates how an object will be draw. What shader it will use, what texture, what blending mode, etc.

Class Methods

debugColor

A simple render state you can use that draws solid colors.

+ (instancetype)debugColor

Declared In

CCRenderer.h

renderStateWithBlendMode:shader:mainTexture:

Create a cached blending mode for a given blending mode, shader and main texture.

+ (instancetype)renderStateWithBlendMode:(CCBlendMode *)blendMode shader:(CCShader *)shader mainTexture:(CCTexture *)mainTexture

Declared In

CCRenderer.h

Instance Methods

initWithBlendMode:shader:shaderUniforms:

Create an uncached blending mode for a given blending mode, shader and set of uncopied uniform values.

- (instancetype)initWithBlendMode:(CCBlendMode *)blendMode shader:(CCShader *)shader shaderUniforms:(NSDictionary *)shaderUniforms

Declared In

CCRenderer.h

initWithBlendMode:shader:shaderUniforms:copyUniforms:

Create an uncached blending mode for a given blending mode, shader and set of uniform values. Allowing the uniform dictionary to be copied allows the render state to be immutable and used more optimally.

- (instancetype)initWithBlendMode:(CCBlendMode *)blendMode shader:(CCShader *)shader shaderUniforms:(NSDictionary *)shaderUniforms copyUniforms:(BOOL)copyUniforms

Declared In

CCRenderer.h