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

Rendering objects that use different shaders? #53

Open
raymoo opened this issue Jan 31, 2018 · 0 comments
Open

Rendering objects that use different shaders? #53

raymoo opened this issue Jan 31, 2018 · 0 comments

Comments

@raymoo
Copy link

raymoo commented Jan 31, 2018

I'm trying to render one object with one shader program, and another with a different program, and I'm running into the issue that all the programs used in a FrameCmd have to have the same uniform parameter thing.

I can only see a couple of ways to do what I want:

  • For each program render its objects into a separate framebuffer and then render this onto the default framebuffer (introducing another shader to be able to handle depth etc.).
  • Make the uniform parameter thing a sum type and use the same type for all of my programs

The first is cumbersome, but the second is workable (though messy). Is there a better way to do what I want? Maybe the answer lies somewhere in the typeclass instances of your types.

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