internal/graphicsdriver/opengl: Refactoring

This commit is contained in:
Hajime Hoshi 2021-08-14 04:05:18 +09:00
parent ce8fc39451
commit da08577095

View File

@ -225,9 +225,9 @@ func (g *Graphics) DrawTriangles(dstID driver.ImageID, srcIDs [graphics.ShaderIm
{
const idx = graphics.DestinationTextureSizeUniformVariableIndex
w, h := destination.framebufferSize()
uniformVars[idx].name = "U0"
uniformVars[idx].name = fmt.Sprintf("U%d", idx)
uniformVars[idx].value = []float32{float32(w), float32(h)}
uniformVars[idx].typ = shader.ir.Uniforms[0]
uniformVars[idx].typ = shader.ir.Uniforms[idx]
}
{
sizes := make([]float32, 2*len(srcIDs))