Documentation ¶
Index ¶
- Constants
- func BlendFunc(src, dst BlendFactor)
- func Bounds(x, y, w, h int)
- func Clear(r, g, b, a float32)
- func Init()
- type Attr
- type AttrFormat
- type AttrType
- type BeginEnder
- type BlendFactor
- type Frame
- type MainThread
- type Shader
- type Texture
- func (t *Texture) Begin()
- func (t *Texture) End()
- func (t *Texture) Height() int
- func (t *Texture) ID() uint32
- func (t *Texture) Pixels(x, y, w, h int) []uint8
- func (t *Texture) SetPixels(x, y, w, h int, pixels []uint8)
- func (t *Texture) SetSmooth(smooth bool)
- func (t *Texture) Smooth() bool
- func (t *Texture) Width() int
- type VertexSlice
- func (vs *VertexSlice) Begin()
- func (vs *VertexSlice) Cap() int
- func (vs *VertexSlice) Draw()
- func (vs *VertexSlice) End()
- func (vs *VertexSlice) Len() int
- func (vs *VertexSlice) SetLen(len int)
- func (vs *VertexSlice) SetVertexData(data []float32)
- func (vs *VertexSlice) Slice(i, j int) *VertexSlice
- func (vs *VertexSlice) Stride() int
- func (vs *VertexSlice) VertexData() []float32
- func (vs *VertexSlice) VertexFormat() AttrFormat
Constants ¶
View Source
const ( One = BlendFactor(gl.ONE) Zero = BlendFactor(gl.ZERO) SrcAlpha = BlendFactor(gl.SRC_ALPHA) DstAlpha = BlendFactor(gl.DST_ALPHA) OneMinusSrcAlpha = BlendFactor(gl.ONE_MINUS_SRC_ALPHA) OneMinusDstAlpha = BlendFactor(gl.ONE_MINUS_DST_ALPHA) )
View Source
const CallQueueCap = 16
Variables ¶
This section is empty.
Functions ¶
func BlendFunc ¶
func BlendFunc(src, dst BlendFactor)
Types ¶
type BeginEnder ¶
type BeginEnder interface { Begin() End() }
type BlendFactor ¶
type BlendFactor int
type MainThread ¶
type MainThread struct {
// contains filtered or unexported fields
}
var Thread *MainThread
func NewMainThread ¶
func NewMainThread() *MainThread
func (*MainThread) Call ¶
func (m *MainThread) Call(f func())
func (*MainThread) CallErr ¶
func (m *MainThread) CallErr(f func() error) error
func (*MainThread) CallVal ¶
func (m *MainThread) CallVal(f func() interface{}) interface{}
func (*MainThread) Post ¶
func (m *MainThread) Post(f func())
func (*MainThread) Run ¶
func (m *MainThread) Run(run func())
type Shader ¶
type Shader struct {
// contains filtered or unexported fields
}
func NewShader ¶
func NewShader(vertexFmt, uniformFmt AttrFormat, vertexShader, fragmentShader string) (*Shader, error)
func (*Shader) SetUniformAttr ¶
func (*Shader) UniformFormat ¶
func (s *Shader) UniformFormat() AttrFormat
func (*Shader) VertexFormat ¶
func (s *Shader) VertexFormat() AttrFormat
type VertexSlice ¶
type VertexSlice struct {
// contains filtered or unexported fields
}
func MakeVertexSlice ¶
func MakeVertexSlice(shader *Shader, len, cap int) *VertexSlice
func (*VertexSlice) Begin ¶
func (vs *VertexSlice) Begin()
func (*VertexSlice) Cap ¶
func (vs *VertexSlice) Cap() int
func (*VertexSlice) Draw ¶
func (vs *VertexSlice) Draw()
func (*VertexSlice) End ¶
func (vs *VertexSlice) End()
func (*VertexSlice) Len ¶
func (vs *VertexSlice) Len() int
func (*VertexSlice) SetLen ¶
func (vs *VertexSlice) SetLen(len int)
func (*VertexSlice) SetVertexData ¶
func (vs *VertexSlice) SetVertexData(data []float32)
func (*VertexSlice) Slice ¶
func (vs *VertexSlice) Slice(i, j int) *VertexSlice
func (*VertexSlice) Stride ¶
func (vs *VertexSlice) Stride() int
func (*VertexSlice) VertexData ¶
func (vs *VertexSlice) VertexData() []float32
func (*VertexSlice) VertexFormat ¶
func (vs *VertexSlice) VertexFormat() AttrFormat
Click to show internal directories.
Click to hide internal directories.