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

Add custom programs to ProgramCache #20496

Merged
merged 1 commit into from
Jul 3, 2020
Merged

Conversation

bolino
Copy link
Contributor

@bolino bolino commented Apr 15, 2020

Store and retrieve custom user-defined programs in ProgramCache.

This feature was in v3 but not present in v4.

Store and retrieve custom user-defined programs to ProgramCache.
@Mee-gu Mee-gu self-requested a review July 3, 2020 02:04
@minggo minggo merged commit a8de1cc into cocos2d:v4 Jul 3, 2020
@minggo minggo added this to the v4-next milestone Jul 3, 2020

void ProgramCache::addCustomProgram(const std::string &key, backend::Program *program)
{
_cachedCustomPrograms.emplace(key, program);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need release old program if key is already exist in _cachedCustomPrograms.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have fixed this in ironhidegames@69f3933
Should I make a new PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please.

Copy link
Contributor

@Mee-gu Mee-gu Jul 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be great.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made a new PR: #20550

one2world added a commit to one2world/cocos2d-x that referenced this pull request Sep 20, 2020
Add custom programs to ProgramCache (cocos2d#20496)
Xrysnow pushed a commit to Xrysnow/cocos2d-x that referenced this pull request Dec 10, 2020
Store and retrieve custom user-defined programs to ProgramCache.
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.

3 participants