()
| 25 | } |
| 26 | |
| 27 | func NewTexture() *Texture { |
| 28 | texture := createTexture() |
| 29 | gl.BindTexture(gl.TEXTURE_2D, texture) |
| 30 | gl.TexImage2D( |
| 31 | gl.TEXTURE_2D, 0, gl.RGBA, |
| 32 | textureSize, textureSize, |
| 33 | 0, gl.RGBA, gl.UNSIGNED_BYTE, nil) |
| 34 | gl.BindTexture(gl.TEXTURE_2D, 0) |
| 35 | t := Texture{} |
| 36 | t.texture = texture |
| 37 | t.lookup = make(map[string]int) |
| 38 | t.ch = make(chan string, 1024) |
| 39 | return &t |
| 40 | } |
| 41 | |
| 42 | func (t *Texture) Purge() { |
| 43 | for { |
no test coverage detected
searching dependent graphs…