(gl: WebGL2RenderingContext, msg: string)
| 173 | } |
| 174 | |
| 175 | export function checkError(gl: WebGL2RenderingContext, msg: string) { |
| 176 | let errno = gl.getError(); |
| 177 | if (errno !== gl.NO_ERROR) { |
| 178 | console.error('GLERROR:', msg, '0x' + errno.toString(16)); |
| 179 | return true; |
| 180 | } |
| 181 | return false; |
| 182 | } |