mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Don't apply depth test during winding fill
This commit is contained in:
parent
a12fa0c03d
commit
4cb16dfc0b
1 changed files with 6 additions and 0 deletions
|
@ -378,7 +378,13 @@ class VShaderWrapper(ShaderWrapper):
|
|||
gl.GL_ONE_MINUS_DST_ALPHA, gl.GL_ONE,
|
||||
)
|
||||
|
||||
# Be sure not to apply depth test while rendering fill
|
||||
# but set it back to where it was after
|
||||
apply_depth_test = bool(gl.glGetBooleanv(gl.GL_DEPTH_TEST))
|
||||
self.ctx.disable(moderngl.DEPTH_TEST)
|
||||
self.fill_vao.render()
|
||||
if apply_depth_test:
|
||||
self.ctx.enable(moderngl.DEPTH_TEST)
|
||||
|
||||
original_fbo.use()
|
||||
gl.glBlendFunc(gl.GL_ONE, gl.GL_ONE_MINUS_SRC_ALPHA)
|
||||
|
|
Loading…
Add table
Reference in a new issue