mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Revert "internal/graphicsdriver: bug fix: render semi-transparent vectors correctly"
This reverts commit 202f642395
.
Reason: TestImageEvenOdd failed
Updates #1933
This commit is contained in:
parent
202f642395
commit
3b0ce21a56
@ -43,7 +43,7 @@ const (
|
||||
screenHeight = 480
|
||||
)
|
||||
|
||||
func drawEbitenText(screen *ebiten.Image, counter int) {
|
||||
func drawEbitenText(screen *ebiten.Image) {
|
||||
var path vector.Path
|
||||
|
||||
// E
|
||||
@ -119,7 +119,6 @@ func drawEbitenText(screen *ebiten.Image, counter int) {
|
||||
vs[i].ColorR = 0xdb / float32(0xff)
|
||||
vs[i].ColorG = 0x56 / float32(0xff)
|
||||
vs[i].ColorB = 0x20 / float32(0xff)
|
||||
vs[i].ColorA = float32((counter/30)%2)/2 + 0.5
|
||||
}
|
||||
screen.DrawTriangles(vs, is, emptySubImage, op)
|
||||
}
|
||||
@ -246,7 +245,7 @@ func (g *Game) Update() error {
|
||||
|
||||
func (g *Game) Draw(screen *ebiten.Image) {
|
||||
screen.Fill(color.White)
|
||||
drawEbitenText(screen, g.counter)
|
||||
drawEbitenText(screen)
|
||||
drawEbitenLogo(screen, 20, 90)
|
||||
drawArc(screen, g.counter)
|
||||
drawWave(screen, g.counter)
|
||||
|
@ -737,13 +737,13 @@ func (g *Graphics) Initialize() error {
|
||||
BackFaceStencil: mtl.StencilDescriptor{
|
||||
StencilFailureOperation: mtl.StencilOperationKeep,
|
||||
DepthFailureOperation: mtl.StencilOperationKeep,
|
||||
DepthStencilPassOperation: mtl.StencilOperationZero,
|
||||
DepthStencilPassOperation: mtl.StencilOperationKeep,
|
||||
StencilCompareFunction: mtl.CompareFunctionNotEqual,
|
||||
},
|
||||
FrontFaceStencil: mtl.StencilDescriptor{
|
||||
StencilFailureOperation: mtl.StencilOperationKeep,
|
||||
DepthFailureOperation: mtl.StencilOperationKeep,
|
||||
DepthStencilPassOperation: mtl.StencilOperationZero,
|
||||
DepthStencilPassOperation: mtl.StencilOperationKeep,
|
||||
StencilCompareFunction: mtl.CompareFunctionNotEqual,
|
||||
},
|
||||
})
|
||||
|
@ -520,6 +520,6 @@ func (c *context) beginStencilWithEvenOddRule() {
|
||||
|
||||
func (c *context) endStencilWithEvenOddRule() {
|
||||
gl.StencilFunc(gl.NOTEQUAL, 0x00, 0xff)
|
||||
gl.StencilOp(gl.KEEP, gl.KEEP, gl.ZERO)
|
||||
gl.StencilOp(gl.KEEP, gl.KEEP, gl.KEEP)
|
||||
gl.ColorMask(true, true, true, true)
|
||||
}
|
||||
|
@ -660,6 +660,6 @@ func (c *context) beginStencilWithEvenOddRule() {
|
||||
func (c *context) endStencilWithEvenOddRule() {
|
||||
gl := c.gl
|
||||
gl.stencilFunc.Invoke(gles.NOTEQUAL, 0x00, 0xff)
|
||||
gl.stencilOp.Invoke(gles.KEEP, gles.KEEP, gles.ZERO)
|
||||
gl.stencilOp.Invoke(gles.KEEP, gles.KEEP, gles.KEEP)
|
||||
gl.colorMask.Invoke(true, true, true, true)
|
||||
}
|
||||
|
@ -488,6 +488,6 @@ func (c *context) beginStencilWithEvenOddRule() {
|
||||
|
||||
func (c *context) endStencilWithEvenOddRule() {
|
||||
c.ctx.StencilFunc(gles.NOTEQUAL, 0x00, 0xff)
|
||||
c.ctx.StencilOp(gles.KEEP, gles.KEEP, gles.ZERO)
|
||||
c.ctx.StencilOp(gles.KEEP, gles.KEEP, gles.KEEP)
|
||||
c.ctx.ColorMask(true, true, true, true)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user