From da08577095b65b8b48f7b18824f522147afef4d3 Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 14 Aug 2021 04:05:18 +0900 Subject: [PATCH] internal/graphicsdriver/opengl: Refactoring --- internal/graphicsdriver/opengl/graphics.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/graphicsdriver/opengl/graphics.go b/internal/graphicsdriver/opengl/graphics.go index 49af2a267..c91b9f3a8 100644 --- a/internal/graphicsdriver/opengl/graphics.go +++ b/internal/graphicsdriver/opengl/graphics.go @@ -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))