You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if the render_to_surface function would respect a transparent base_color and then show whatever is already rendered to the surface.
The main issue here is that BlendState::ALPHA_BLENDING would need to be set in the ColorTargetState in the BlitPipeline, but that's set for the Renderer and the background color is set in the RenderParams which is passed at each invocation of render_to_surface.
This also demonstrates that Renderer should perhaps be two different types, with a SurfaceRendener wrapping Renderer and storing the BlitPipeline and TargetTexture members, since they aren't used when rendering to a texture.
There are other issues with the current code, like if you're rendering to multiple surfaces and they're different sizes, then you'd be constantly creating and re-creating the TargetTexture.
Alternatively, maybe the render_to_surface should just be somewhere else and not part of the core library ...
The text was updated successfully, but these errors were encountered:
It would be nice if the
render_to_surface
function would respect a transparentbase_color
and then show whatever is already rendered to the surface.The main issue here is that
BlendState::ALPHA_BLENDING
would need to be set in theColorTargetState
in theBlitPipeline
, but that's set for theRenderer
and the background color is set in theRenderParams
which is passed at each invocation ofrender_to_surface
.This also demonstrates that
Renderer
should perhaps be two different types, with aSurfaceRendener
wrappingRenderer
and storing theBlitPipeline
andTargetTexture
members, since they aren't used when rendering to a texture.There are other issues with the current code, like if you're rendering to multiple surfaces and they're different sizes, then you'd be constantly creating and re-creating the
TargetTexture
.Alternatively, maybe the
render_to_surface
should just be somewhere else and not part of the core library ...The text was updated successfully, but these errors were encountered: