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

[Suggestion]: refactor ShaderRenderer #141

Open
AntonPieper opened this issue Jun 15, 2023 · 2 comments
Open

[Suggestion]: refactor ShaderRenderer #141

AntonPieper opened this issue Jun 15, 2023 · 2 comments

Comments

@AntonPieper
Copy link
Contributor

AntonPieper commented Jun 15, 2023

ShaderRenderer is currently a big monolithic class. Maybe it makes sense to incorporate a more composable / modular design, so that future additional uniforms are easier to add.

Example: a GyroscopeUniformComponent instead of writing it into the ShaderRenderer class. This also follows SRP (Single Responsibility Principle). I'll look more into it, but maybe a possible UniformComponent interface could be like following:

public interface UniformComponent {
    void register();
    void deregister();
}
@markusfisch
Copy link
Owner

markusfisch commented Jun 15, 2023 via email

@AntonPieper
Copy link
Contributor Author

You are right, keeping it as simple as possible is really important. Adding abstractions just for no reason will only add complexity. I'll try some ideas, but most ideas I had added more state / complexity in hindsight, so I don't think that's worth merging

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

No branches or pull requests

2 participants