MCPcopy
hub / github.com/fogleman/nes / setTexture

Function setTexture

ui/util.go:144–149  ·  view source on GitHub ↗
(im *image.RGBA)

Source from the content-addressed store, hash-verified

142}
143
144func setTexture(im *image.RGBA) {
145 size := im.Rect.Size()
146 gl.TexImage2D(
147 gl.TEXTURE_2D, 0, gl.RGBA, int32(size.X), int32(size.Y),
148 0, gl.RGBA, gl.UNSIGNED_BYTE, gl.Ptr(im.Pix))
149}
150
151func copyImage(src image.Image) *image.RGBA {
152 dst := image.NewRGBA(src.Bounds())

Callers 1

UpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected