コード例 #1
0
ファイル: context_desktop.go プロジェクト: hajimehoshi/ebiten
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
ファイル: context.go プロジェクト: DrJosh9000/ebiten
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))
}