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

feat: simplify feature loading #115

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

FlayaN
Copy link
Collaborator

@FlayaN FlayaN commented Oct 1, 2023

Simplify feature loading by adding optional virtual functions in Feature.h that can be overriden by features. This will reduce the need to modify State.cpp, XSEPlugin.cpp & Menu.cpp when adding new features etc

Added to Feature.h:

  • DataLoaded <-- Called by SKSE kDataLoaded event
  • PostPostLoad <-- Called by SKSE kPostPostLoad event
  • ClearShaderCache <-- Called by imgui clear shader cache button
  • DrawDeferred <-- This one is not called yet, that is in the subsurface-scattering branch

Fixed almost all tasks of #97

Link to build for this PR -> https://github.com/FlayaN/skyrim-community-shaders/releases/tag/untagged-626eeecf0c4665d55ff6

Created this as a draft due to this should maybe wait until subsurface-scattering is in dev (Or maybe remove the DrawDeferred part of the PR), would like some feedback if this is what you meant on your issue @alandtse

Copy link
Collaborator

@alandtse alandtse left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks for handling. We're probably not merging the new features for a while so not sure we need to wait. Can you also update the wiki developer section explaining the new overrides?

@FlayaN
Copy link
Collaborator Author

FlayaN commented Oct 1, 2023

Ah gotcha! Do you think I should include the drawdeferred or not? Due to it not being called yet

@alandtse
Copy link
Collaborator

alandtse commented Oct 1, 2023

Fine to include. We can PR the features to use it when they come in.

@FlayaN FlayaN marked this pull request as ready for review October 1, 2023 19:04
@FlayaN
Copy link
Collaborator Author

FlayaN commented Oct 1, 2023

Nice, I'll update the wiki as soon as this is merged then!

@doodlum doodlum merged commit 0f3f128 into doodlum:dev Oct 1, 2023
3 checks passed
alandtse added a commit to alandtse/skyrim-community-shaders that referenced this pull request Oct 4, 2023
@FlayaN FlayaN deleted the simplify-feature-loading branch March 11, 2024 18:19
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