示例#1
0
func (c *Context) UniformInt(p Program, location string, v int) {
	_ = c.runOnContextThread(func() error {
		l := int32(c.locationCache.GetUniformLocation(c, p, location))
		gl.Uniform1i(l, int32(v))
		return nil
	})
}
示例#2
0
文件: gl_opengl.go 项目: tanema/amore
// Uniform1i writes an int uniform variable.
//
// Uniform1i and Uniform1iv are the only two functions that may be used
// to load uniform variables defined as sampler types. Loading samplers
// with any other function will result in a INVALID_OPERATION error.
//
// http://www.khronos.org/opengles/sdk/docs/man3/html/glUniform.xhtml
func Uniform1i(dst Uniform, v int) {
	gl.Uniform1i(dst.Value, int32(v))
}
示例#3
0
func (c *Context) UniformInt(p Program, location string, v int) {
	l := int32(GetUniformLocation(c, p, location))
	gl.Uniform1i(l, int32(v))
}
示例#4
0
文件: gg.go 项目: dmac/gg
func (*backend) Uniform1i(u *gg.Uniform, v0 int) {
	gl.Uniform1i(u.Value.(int32), int32(v0))
}