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

Drawing non-affected Elements like in HelloPenumbra doesn't seem to work #41

Open
BratPfanneTV opened this issue Aug 17, 2023 · 0 comments

Comments

@BratPfanneTV
Copy link

Hello!

I have tried to implement Penumbra similarly to how it's done in HelloPenumbra.cs, meaning I call both PenumbraComponent.BeginDraw() and PenumbraComponent.Draw() in my Draw Method, so that I can exclude some things from being affected by Penumbra.

However, in that file, the PenumbraComponent is not added to the Components List (as far as I can tell), which when I try it causes Penumbra to not have any effect at all.
If, however, I do add the PenumbraComponent to the Components List, then the base.Draw() call in my project causes things to break, as it attempts to call all Draw() functions of all Components, which won't work since Penumbra throws an exception if Draw() is called without BeginDraw() having been called beforehand.
Inserting a second BeginDraw() before base.Draw() also doesn't work, since it seems to result in only a black screen.
The only solution I can think of that might work would be to omit the base.Draw() call altogether, but surely that can't be right since that would cause other Components to no longer be drawn.

I can't tell what I'm doing wrong here. Any help would be appreciated!

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

1 participant