MCPcopy Index your code
hub / github.com/g3n/engine / newTexture2D

Function newTexture2D

texture/texture2D.go:57–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

55}
56
57func newTexture2D() *Texture2D {
58
59 t := new(Texture2D)
60 t.gs = nil
61 t.refcount = 1
62 t.texname = 0
63 t.magFilter = gls.LINEAR
64 t.minFilter = gls.LINEAR_MIPMAP_LINEAR
65 t.wrapS = gls.CLAMP_TO_EDGE
66 t.wrapT = gls.CLAMP_TO_EDGE
67 t.updateData = false
68 t.updateParams = true
69 t.genMipmap = true
70
71 // Initialize Uniform elements
72 t.uniUnit.Init("MatTexture")
73 t.uniInfo.Init("MatTexinfo")
74 t.SetOffset(0, 0)
75 t.SetRepeat(1, 1)
76 t.SetFlipY(true)
77 t.SetVisible(true)
78 return t
79}
80
81// NewTexture2DFromImage creates and returns a pointer to a new Texture2D
82// using the specified image file as data.

Callers 4

NewTexture2DFromImageFunction · 0.85
NewTexture2DFromRGBAFunction · 0.85
NewTexture2DFromDataFunction · 0.85

Calls 5

SetOffsetMethod · 0.80
SetRepeatMethod · 0.80
SetFlipYMethod · 0.80
SetVisibleMethod · 0.65
InitMethod · 0.45

Tested by

no test coverage detected