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

Function NewTexture2DFromRGBA

texture/texture2D.go:98–103  ·  view source on GitHub ↗

NewTexture2DFromRGBA creates a new texture from a pointer to an RGBA image object.

(rgba *image.RGBA)

Source from the content-addressed store, hash-verified

96
97// NewTexture2DFromRGBA creates a new texture from a pointer to an RGBA image object.
98func NewTexture2DFromRGBA(rgba *image.RGBA) *Texture2D {
99
100 t := newTexture2D()
101 t.SetFromRGBA(rgba)
102 return t
103}
104
105// NewTexture2DFromData creates a new texture from data
106func NewTexture2DFromData(width, height int, format int, formatType, iformat int, data interface{}) *Texture2D {

Callers 4

NewImageFromRGBAFunction · 0.92
SetTextMethod · 0.92
setTextCaretMethod · 0.92
LoadTextureMethod · 0.92

Calls 2

newTexture2DFunction · 0.85
SetFromRGBAMethod · 0.80

Tested by

no test coverage detected