MCPcopy Create free account
hub / github.com/fogleman/nes / NewTexture

Function NewTexture

ui/texture.go:27–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27func 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
42func (t *Texture) Purge() {
43 for {

Callers 1

NewMenuViewFunction · 0.85

Calls 1

createTextureFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…