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

Struct Texture2D

texture/texture2D.go:26–55  ·  view source on GitHub ↗

Texture2D represents a texture

Source from the content-addressed store, hash-verified

24
25// Texture2D represents a texture
26type Texture2D struct {
27 gs *gls.GLS // Pointer to OpenGL state
28 refcount int // Current number of references
29 texname uint32 // Texture handle
30 magFilter uint32 // magnification filter
31 minFilter uint32 // minification filter
32 wrapS uint32 // wrap mode for s coordinate
33 wrapT uint32 // wrap mode for t coordinate
34 iformat int32 // internal format
35 width int32 // texture width in pixels
36 height int32 // texture height in pixels
37 format uint32 // format of the pixel data
38 formatType uint32 // type of the pixel data
39 updateData bool // texture data needs to be sent
40 updateParams bool // texture parameters needs to be sent
41 genMipmap bool // generate mipmaps flag
42 compressed bool // whether the texture is compressed
43 size int32 // the size of the texture data in bytes
44 data interface{} // array with texture data
45 uniUnit gls.Uniform // Texture unit uniform location cache
46 uniInfo gls.Uniform // Texture info uniform location cache
47 udata struct { // Combined uniform data in 3 vec2:
48 offsetX float32
49 offsetY float32
50 repeatX float32
51 repeatY float32
52 flipY float32
53 visible float32
54 }
55}
56
57func newTexture2D() *Texture2D {
58

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected