Documentation ¶
Index ¶
- func AdvanceFrame()
- func Color(argb uint32)
- func Destroy()
- func DrawBorder(x, y, w, h, thickness float32)
- func DrawCircle(x, y float32, r float32)
- func DrawLine(from, to f32.Vec2)
- func DrawRect(x, y, w, h float32)
- func DrawStr(x, y float32, str string, args ...interface{})
- func DrawStrScaled(x, y float32, scale float32, str string, args ...interface{})
- func GlyphRegion(char byte) (left, right, bottom, top float32)
- func Hud(format string, args ...interface{})
- func HudFunc(fn func() string)
- func Init(w, h int)
- func LoadFontImage() (img image.Image, fmt string, err error)
- func LogFPS(fps, drawCall int)
- func SetCamera(x, y, w, h float32)
- func SetDebug(enum DebugEnum)
- type DebugEnum
- type DebugRender
- type FontSystem
- type HudLog
- type PosTexColorVertex
- type TextShapeBuffer
- func (buff *TextShapeBuffer) Border(x, y, w, h, thick float32)
- func (buff *TextShapeBuffer) Circle(x, y float32, radius float32)
- func (buff *TextShapeBuffer) Destroy()
- func (buff *TextShapeBuffer) Line(from, to f32.Vec2)
- func (buff *TextShapeBuffer) Rect(x, y, w, h float32)
- func (buff *TextShapeBuffer) Reset()
- func (buff *TextShapeBuffer) String(x, y float32, chars string, scale float32)
- func (buff *TextShapeBuffer) Update()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AdvanceFrame ¶
func AdvanceFrame()
func DrawBorder ¶
func DrawBorder(x, y, w, h, thickness float32)
func DrawStrScaled ¶
func GlyphRegion ¶
Types ¶
type DebugRender ¶
type DebugRender struct { // buffer Buffer TextShapeBuffer // contains filtered or unexported fields }
func NewDebugRender ¶
func NewDebugRender(vsh, fsh string) *DebugRender
func (*DebugRender) Destroy ¶
func (dr *DebugRender) Destroy()
func (*DebugRender) Draw ¶
func (dr *DebugRender) Draw()
func (*DebugRender) SetViewPort ¶
func (dr *DebugRender) SetViewPort(x, y, w, h float32)
type FontSystem ¶
type PosTexColorVertex ¶
type TextShapeBuffer ¶
type TextShapeBuffer struct {
// contains filtered or unexported fields
}
Rect:
3 ---- 2 | ` | | ` | 0------1
Order: 3, 0, 1, 3, 1, 2
func (*TextShapeBuffer) Border ¶
func (buff *TextShapeBuffer) Border(x, y, w, h, thick float32)
func (*TextShapeBuffer) Circle ¶
func (buff *TextShapeBuffer) Circle(x, y float32, radius float32)
func (*TextShapeBuffer) Destroy ¶
func (buff *TextShapeBuffer) Destroy()
func (*TextShapeBuffer) Line ¶
func (buff *TextShapeBuffer) Line(from, to f32.Vec2)
func (*TextShapeBuffer) Rect ¶
func (buff *TextShapeBuffer) Rect(x, y, w, h float32)
3-------2 | | | | 0-------1
func (*TextShapeBuffer) Reset ¶
func (buff *TextShapeBuffer) Reset()
func (*TextShapeBuffer) String ¶
func (buff *TextShapeBuffer) String(x, y float32, chars string, scale float32)
func (*TextShapeBuffer) Update ¶
func (buff *TextShapeBuffer) Update()
Click to show internal directories.
Click to hide internal directories.