Documentation ¶
Index ¶
- Constants
- Variables
- func CheckError(obj uint32, status uint32, getiv func(uint32, uint32, *int32), ...) bool
- func CheckGLErrors()
- func ClearRenderer()
- func ClearTextRenderer()
- func ColorForShape(shape *cp.Shape, data interface{}) cp.FColor
- func CompileShader(typ uint32, source string) uint32
- func DefaultDraw(space *Space)
- func Display(space *Space, tick float64, update UpdateFunc, draw DrawFunc)
- func DrawBB(bb BB, outline FColor)
- func DrawCircle(pos Vector, angle, radius float64, outline, fill FColor)
- func DrawDot(size float64, pos Vector, fill FColor)
- func DrawFatSegment(a, b Vector, radius float64, outline, fill FColor)
- func DrawInfo(space *Space)
- func DrawInit()
- func DrawInstructions()
- func DrawPolygon(count int, verts []Vector, radius float64, outline, fill FColor)
- func DrawSegment(a, b Vector, fill FColor)
- func DrawString(pos Vector, str string)
- func FlushRenderer()
- func FlushTextRenderer()
- func LinkProgram(vshader, fshader uint32) uint32
- func Main(space *Space, tick float64, update UpdateFunc, draw DrawFunc)
- func MouseToSpace(x, y float64, ww, wh int) Vector
- func PushChar(character int32, x, y float64, color FColor) float64
- func SetAttribute(program uint32, name string, size int32, gltype uint32, stride int32, ...)
- func TextInit()
- func Update(space *Space, tick float64, update UpdateFunc)
- func V2f(v Vector) v2f
- type DrawFunc
- type DrawOptions
- func (d *DrawOptions) CollisionPointColor() FColor
- func (d *DrawOptions) ConstraintColor() FColor
- func (d *DrawOptions) Data() interface{}
- func (*DrawOptions) DrawCircle(pos Vector, angle, radius float64, outline, fill FColor, data interface{})
- func (*DrawOptions) DrawDot(size float64, pos Vector, fill FColor, data interface{})
- func (*DrawOptions) DrawFatSegment(a, b Vector, radius float64, outline, fill FColor, data interface{})
- func (*DrawOptions) DrawPolygon(count int, verts []Vector, radius float64, outline, fill FColor, ...)
- func (*DrawOptions) DrawSegment(a, b Vector, fill FColor, data interface{})
- func (d *DrawOptions) Flags() uint
- func (d *DrawOptions) OutlineColor() FColor
- func (*DrawOptions) ShapeColor(shape *Shape, data interface{}) FColor
- type TextTriangle
- type TextVertex
- type Triangle
- type UpdateFunc
- type Vertex
Constants ¶
View Source
const DrawPointLineScale = 1
Variables ¶
View Source
var GRABBABLE_MASK_BIT uint = 1 << 31
View Source
var GrabFilter cp.ShapeFilter = cp.ShapeFilter{ cp.NO_GROUP, GRABBABLE_MASK_BIT, GRABBABLE_MASK_BIT, }
View Source
var Keyboard Vector
View Source
var Mouse Vector
View Source
var NotGrabbableFilter cp.ShapeFilter = cp.ShapeFilter{ cp.NO_GROUP, ^GRABBABLE_MASK_BIT, ^GRABBABLE_MASK_BIT, }
View Source
var RightClick = false
View Source
var RightDown = false
Functions ¶
func CheckError ¶
func CheckGLErrors ¶
func CheckGLErrors()
func ClearRenderer ¶
func ClearRenderer()
func ClearTextRenderer ¶
func ClearTextRenderer()
func CompileShader ¶
func DefaultDraw ¶
func DefaultDraw(space *Space)
func Display ¶
func Display(space *Space, tick float64, update UpdateFunc, draw DrawFunc)
func DrawCircle ¶
func DrawCircle(pos Vector, angle, radius float64, outline, fill FColor)
func DrawFatSegment ¶
func DrawFatSegment(a, b Vector, radius float64, outline, fill FColor)
func DrawInstructions ¶
func DrawInstructions()
func DrawPolygon ¶
func DrawSegment ¶
func DrawSegment(a, b Vector, fill FColor)
func DrawString ¶
func DrawString(pos Vector, str string)
func FlushRenderer ¶
func FlushRenderer()
func FlushTextRenderer ¶
func FlushTextRenderer()
func LinkProgram ¶
func Main ¶
func Main(space *Space, tick float64, update UpdateFunc, draw DrawFunc)
func MouseToSpace ¶
func SetAttribute ¶
func Update ¶
func Update(space *Space, tick float64, update UpdateFunc)
Types ¶
type DrawOptions ¶
type DrawOptions struct {
// contains filtered or unexported fields
}
func NewDrawOptions ¶
func NewDrawOptions(flags uint, outline, constraint, collisionPoint FColor, data interface{}) *DrawOptions
func (*DrawOptions) CollisionPointColor ¶
func (d *DrawOptions) CollisionPointColor() FColor
func (*DrawOptions) ConstraintColor ¶
func (d *DrawOptions) ConstraintColor() FColor
func (*DrawOptions) Data ¶
func (d *DrawOptions) Data() interface{}
func (*DrawOptions) DrawCircle ¶
func (*DrawOptions) DrawCircle(pos Vector, angle, radius float64, outline, fill FColor, data interface{})
func (*DrawOptions) DrawDot ¶
func (*DrawOptions) DrawDot(size float64, pos Vector, fill FColor, data interface{})
func (*DrawOptions) DrawFatSegment ¶
func (*DrawOptions) DrawFatSegment(a, b Vector, radius float64, outline, fill FColor, data interface{})
func (*DrawOptions) DrawPolygon ¶
func (*DrawOptions) DrawPolygon(count int, verts []Vector, radius float64, outline, fill FColor, data interface{})
func (*DrawOptions) DrawSegment ¶
func (*DrawOptions) DrawSegment(a, b Vector, fill FColor, data interface{})
func (*DrawOptions) Flags ¶
func (d *DrawOptions) Flags() uint
func (*DrawOptions) OutlineColor ¶
func (d *DrawOptions) OutlineColor() FColor
func (*DrawOptions) ShapeColor ¶
func (*DrawOptions) ShapeColor(shape *Shape, data interface{}) FColor
type TextTriangle ¶
type TextTriangle struct {
// contains filtered or unexported fields
}
type TextVertex ¶
type TextVertex struct {
// contains filtered or unexported fields
}
8*2 + 16 = 32
type UpdateFunc ¶
type UpdateFunc func(*Space, float64)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.