func (c *Context) DeleteProgram(p Program) { gl := c.gl if !gl.IsProgram(mgl.Program(p)) { return } gl.DeleteProgram(mgl.Program(p)) }
func (c *Context) getAttribLocationImpl(p Program, location string) attribLocation { gl := c.gl a := attribLocation(gl.GetAttribLocation(mgl.Program(p), location)) if a.Value == ^uint(0) { panic("invalid attrib location: " + location) } return a }
func (c *Context) getUniformLocationImpl(p Program, location string) uniformLocation { gl := c.gl u := uniformLocation(gl.GetUniformLocation(mgl.Program(p), location)) if u.Value == -1 { panic("invalid uniform location: " + location) } return u }
func (c *Context) UseProgram(p Program) { gl := c.gl gl.UseProgram(mgl.Program(p)) }