Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metal Prep Step 9 - Immutable render passes #1313

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Metal Prep Step 9 - Immutable render passes #1313

wants to merge 3 commits into from

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.

None yet

1 participant