func (c *glContext) checkError(str string) { if c.flags&Debug == 0 { return } err := gl.GetError() if err != gl.NO_ERROR { dumpLog("Error %08x after %s\n", err, str) } }
func checkError(p *glContext, str string) { if p.flags&Debug == 0 { return } err := gl.GetError() if err != gl.NO_ERROR { dumpLog("Error %08x after %s\n", int(err), str) } }
func checkError() { if v := gl.GetError(); v != 0 { switch v { case gl.INVALID_ENUM: panic("GL returned error GL_INVALID_ENUM") case gl.INVALID_FRAMEBUFFER_OPERATION: panic("GL returned error GL_INVALID_FRAMEBUFFER_OPERATION") case gl.INVALID_OPERATION: panic("GL returned error GL_INVALID_OPERATION") case gl.INVALID_VALUE: panic("GL returned error GL_INVALID_VALUE") default: panic(fmt.Errorf("GL returned error 0x%.4x", v)) } } }