add f32color.RGBA

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2020-03-11 13:01:42 +02:00
committed by Elias Naur
parent 7024a0e691
commit 7c1a21ce56
6 changed files with 105 additions and 77 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ import (
"unsafe"
"gioui.org/gpu/backend"
"gioui.org/internal/f32color"
gunsafe "gioui.org/internal/unsafe"
"golang.org/x/sys/windows"
)
@@ -26,7 +27,7 @@ type Device struct {
}
type Backend struct {
clearColor [4]float32
clearColor f32color.RGBA
clearDepth float32
viewport _D3D11_VIEWPORT
depthState depthState
@@ -539,7 +540,7 @@ func (b *Backend) NewProgram(vertexShader, fragmentShader backend.ShaderSources)
}
func (b *Backend) ClearColor(colr, colg, colb, cola float32) {
b.clearColor = [...]float32{colr, colg, colb, cola}
b.clearColor = f32color.RGBA{R: colr, G: colg, B: colb, A: cola}
}
func (b *Backend) Clear(buffers backend.BufferAttachments) {