-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
"Global" RenderStates
#233
Comments
You're right, it doesn't make sense to specify clip for each material, it's a leftover from the time where the render states was given as argument to each render call. It should be specified when starting to write to a render target. And then removed from each material. Will do it in combination with #200 . Also this is related to #76 . Does that solve your problem or do you need other global render states? I think most of them makes sense that they are tied to a material, or at least can be specified from a material, but I could also imagine that you wanted to specify some of them globally, for example write mask. |
That sounds good to me! For me it is only the clip/scissor rect I currently want to remove form the material; I haven't thought through the others. |
I'll start with clip/scissor then and keep the others on the material. I'll have something soon 🙂 |
Just merged the changes, so now you can specify a |
Currently
RenderStates
is part of the material. For my use case it would make much more sense to be able to set oneRenderStates
for everything I want to render (i.e. pass it as an argument tothree_d::render_pass
.In particular, I want to set a clip region (different each frame), and it is weird to have to mutate each of my allocated meshes to be able to do so.
Perhaps there are circumstances where it makes sense to have
RenderStates
be tied to the material (though I find it hard to come up with a situation). To support those cases, perhaps we can change*Material::render_states
into anOption<RenderStates>
?The text was updated successfully, but these errors were encountered: