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

Function createTexture

ui/util.go:132–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130}
131
132func 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
144func setTexture(im *image.RGBA) {
145 size := im.Rect.Size()

Callers 2

NewGameViewFunction · 0.85
NewTextureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…