mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
gpu: setup OpenGL ES texture uniforms automatically from shader metadata
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -134,11 +134,6 @@ func newCoverer(ctx Backend) *coverer {
|
||||
}
|
||||
c.prog = prog
|
||||
c.layout = layout
|
||||
texProg := prog[materialTexture].prog
|
||||
texProg.Uniform1i(texProg.UniformFor("tex"), 0)
|
||||
for _, p := range prog {
|
||||
p.prog.Uniform1i(p.prog.UniformFor("cover"), 1)
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
@@ -190,8 +185,6 @@ func newStenciler(ctx Backend) *stenciler {
|
||||
panic(err)
|
||||
}
|
||||
vertUniforms = newUniformBuffer(ctx, &st.iprog.uniforms.vert)
|
||||
coverLoc := iprog.UniformFor("cover")
|
||||
iprog.Uniform1i(coverLoc, 0)
|
||||
st.iprog.prog = newProgram(iprog, vertUniforms, nil)
|
||||
st.iprog.layout = iprogLayout
|
||||
return st
|
||||
|
||||
Reference in New Issue
Block a user