()
| 130 | } |
| 131 | |
| 132 | func createTexture() uint32 { |
| 133 | var texture uint32 |
| 134 | gl.GenTextures(1, &texture) |
| 135 | gl.BindTexture(gl.TEXTURE_2D, texture) |
| 136 | gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST) |
| 137 | gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST) |
| 138 | gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE) |
| 139 | gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE) |
| 140 | gl.BindTexture(gl.TEXTURE_2D, 0) |
| 141 | return texture |
| 142 | } |
| 143 | |
| 144 | func setTexture(im *image.RGBA) { |
| 145 | size := im.Rect.Size() |
no outgoing calls
no test coverage detected
searching dependent graphs…