Skip to content

Conversation

@thayerandrews
Copy link
Contributor

This isn't strictly necessary for Metal support but it's the last bit of cleanup that I wanted to work in with all of the refactoring that is necessary for Metal support. All classes that define an effect implementation are now immutable and, with this change, a whole host of potential "What would happen if X changed unexpectedly behind my back?" type situations are removed as are the bugs that go with them.

Here's a bit more detail:

  • CCEffectRenderPass is immutable and effect implementations no longer directly create render pass objects.
  • CCEffectRenderPassDescriptor is introduced. This is what effects now create and hand off to CCEffectImpl at initialization time. CCEffectImpl uses the descriptors to create render pass objects internally.
  • CCEffectRenderPassBeginBlockContext becomes CCEffectBeginBlockContext because CCERPBBC was too long. It's immutable now too.
  • CCEffectRenderPassBeginBlock and UpdateBlock become CCEffectBeginBlock and CCEffectUpdateBlock (for consistency with the previous item).
  • All effects are updated to adapt to these changes.

Thayer J Andrews added 3 commits April 22, 2015 17:39
And CCEffectRenderPassBeginBlockContext. With this change, all classes that define an effect are
immutable which gets rid of a variety of potential issues if objects were mutated after an effect was
created with them.
CCEffectRenderPassBeginBlockContext -> CCEffectBeginBlockContext
CCEffectRenderPassBeginBlock -> CCEffectBeginBlock
CCEffectRenderPassUpdateBlock -> CCEffectUpdateBlock

Because CCERPBBC was just too long and the other two are for consistency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant