MCPcopy
hub / github.com/g3n/engine / SetData

Method SetData

texture/texture2D.go:185–195  ·  view source on GitHub ↗

SetData sets the texture data

(width, height int, format int, formatType, iformat int, data interface{})

Source from the content-addressed store, hash-verified

183
184// SetData sets the texture data
185func (t *Texture2D) SetData(width, height int, format int, formatType, iformat int, data interface{}) {
186
187 t.width = int32(width)
188 t.height = int32(height)
189 t.format = uint32(format)
190 t.formatType = uint32(formatType)
191 t.iformat = int32(iformat)
192 t.compressed = false
193 t.data = data
194 t.updateData = true
195}
196
197// SetCompressedData sets the compressed texture data
198func (t *Texture2D) SetCompressedData(width, height int, iformat int32, size int32, data interface{}) {

Callers 2

SetFromRGBAMethod · 0.95
NewTexture2DFromDataFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected