Documentation ¶
Index ¶
- Constants
- type TexFilterMode
- type TexTarget
- type TexWrapMode
- type Texture
- func (tex *Texture) Alloc(level, internalFormat, width, height, depth int32, format, dataType uint32, ...)
- func (tex *Texture) AllocWithBytes(bytes []byte, width, height int32, level, internalFormat int32, format uint32)
- func (tex *Texture) AllocWithFile1D(file io.Reader, level, internalFormat int32, format, dataType uint32) error
- func (tex *Texture) AllocWithFile2D(file io.Reader, level, internalFormat int32, format, dataType uint32) error
- func (tex *Texture) AllocWithFile3D(files [6]io.Reader, level, internalFormat int32, format, dataType uint32) error
- func (tex *Texture) AllocWithImage(img image.Image, level, internalFormat int32, format, dataType uint32)
- func (tex *Texture) As(target TexTarget) *Texture
- func (tex *Texture) Bind(unit int)
- func (tex *Texture) BindFor(unit int, context utils.BindingClosure)
- func (tex *Texture) FilterMode(minMode, magMode TexFilterMode)
- func (tex *Texture) GenerateMipmap()
- func (tex *Texture) Id() uint32
- func (tex *Texture) Unbind(unit int)
- func (tex *Texture) WrapMode(sMode, tMode, rMode TexWrapMode)
- type TypeErr
- type Vao
- type Vbo
- func (vbo *Vbo) Bind(target uint32)
- func (vbo *Vbo) BindFor(target uint32, context utils.BindingClosure)
- func (vbo *Vbo) Destroy()
- func (vbo *Vbo) Id() uint32
- func (vbo *Vbo) Layout(index int, size int, dataType interface{}, normalized bool, stride int) (err error)
- func (vbo *Vbo) MustLayout(index int, size int, dataType interface{}, normalized bool, stride int)
- func (vbo *Vbo) Unbind(target uint32)
- func (vbo *Vbo) Write(mode uint32, data interface{})
- func (vbo *Vbo) WriteStatic(data interface{})
Constants ¶
View Source
const ( WrapClampToEdge = TexWrapMode(gl.CLAMP_TO_EDGE) WrapClampToBorder = TexWrapMode(gl.CLAMP_TO_BORDER) WrapMirroredRepeat = TexWrapMode(gl.MIRRORED_REPEAT) WrapRepeat = TexWrapMode(gl.REPEAT) WrapMirrorClampToEdge = TexWrapMode(gl.MIRROR_CLAMP_TO_EDGE) )
Texture Wrap Modes
View Source
const ( FilterNearest = TexFilterMode(gl.NEAREST) FilterLinear = TexFilterMode(gl.LINEAR) )
Common texture filters
View Source
const ( FilterNearestMipMapNearest = TexFilterMode(gl.NEAREST_MIPMAP_NEAREST) FilterLinearMipMapNearest = TexFilterMode(gl.LINEAR_MIPMAP_NEAREST) FilterNearestMipMapLinear = TexFilterMode(gl.NEAREST_MIPMAP_LINEAR) FilterLinearMipMapLinear = TexFilterMode(gl.LINEAR_MIPMAP_LINEAR) )
Texture minification filters
View Source
const ( Texture1D = TexTarget(gl.TEXTURE_1D) TextureProxy1D = TexTarget(gl.PROXY_TEXTURE_1D) )
1D Texture targets
View Source
const ( Texture2D = TexTarget(gl.TEXTURE_2D) TextureProxy2D = TexTarget(gl.PROXY_TEXTURE_2D) Texture1DArray = TexTarget(gl.TEXTURE_1D_ARRAY) TextureProxy1DArray = TexTarget(gl.PROXY_TEXTURE_1D_ARRAY) TextureRectangle = TexTarget(gl.TEXTURE_RECTANGLE) TextureProxyRectangle = TexTarget(gl.PROXY_TEXTURE_RECTANGLE) TextureCubeMapPositiveX = TexTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_X) TextureCubeMapPositiveY = TexTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Y) TextureCubeMapPositiveZ = TexTarget(gl.TEXTURE_CUBE_MAP_POSITIVE_Z) TextureCubeMapNegativeX = TexTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_X) TextureCubeMapNegativeY = TexTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Y) TextureCubeMapNegativeZ = TexTarget(gl.TEXTURE_CUBE_MAP_NEGATIVE_Z) TextureProxyCubeMap = TexTarget(gl.PROXY_TEXTURE_CUBE_MAP) )
2D Texture targets
View Source
const ( Texture3D = TexTarget(gl.TEXTURE_3D) TextureProxy3D = TexTarget(gl.PROXY_TEXTURE_3D) Texture2DArray = TexTarget(gl.TEXTURE_2D_ARRAY) TextureProxy2DArray = TexTarget(gl.PROXY_TEXTURE_2D_ARRAY) )
3D Texture targets
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TexFilterMode ¶
type TexFilterMode int
type TexWrapMode ¶
type TexWrapMode int
type Texture ¶
type Texture struct { Target TexTarget // contains filtered or unexported fields }
func NewTexture ¶
func (*Texture) AllocWithBytes ¶
func (*Texture) AllocWithFile1D ¶
func (*Texture) AllocWithFile2D ¶
func (*Texture) AllocWithFile3D ¶
func (tex *Texture) AllocWithFile3D(files [6]io.Reader, level, internalFormat int32, format, dataType uint32) error
files - right (+x), left (-x), top (+y), bottom (-y), back (+z), front (-z)
func (*Texture) AllocWithImage ¶
func (*Texture) FilterMode ¶
func (tex *Texture) FilterMode(minMode, magMode TexFilterMode)
func (*Texture) GenerateMipmap ¶
func (tex *Texture) GenerateMipmap()
func (*Texture) WrapMode ¶
func (tex *Texture) WrapMode(sMode, tMode, rMode TexWrapMode)
type Vao ¶
type Vao struct {
// contains filtered or unexported fields
}
func (*Vao) BindFor ¶
func (vao *Vao) BindFor(context utils.BindingClosure)
Click to show internal directories.
Click to hide internal directories.