(index int)
| 84 | } |
| 85 | |
| 86 | func (t *Texture) coord(index int) (x, y, dx, dy float32) { |
| 87 | x = float32(index%textureDim) / textureDim |
| 88 | y = float32(index/textureDim) / textureDim |
| 89 | dx = 1.0 / textureDim |
| 90 | dy = dx * 240 / 256 |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | func (t *Texture) load(path string) int { |
| 95 | index := t.lru() |