Versions in this module Expand all Collapse all v1 v1.0.1 Oct 17, 2014 Changes in this version + var ColorModel color.Model = color.ModelFunc(colorModel) + var DefaultBlendState = BlendState + var DefaultState = State + var DefaultStencilState = StencilState + func InsertionSort(data sort.Interface) + type AlphaMode uint8 + const AlphaBlend + const AlphaToCoverage + const BinaryAlpha + const NoAlpha + func (m AlphaMode) String() string + type BlendEq uint8 + const BAdd + const BReverseSub + const BSub + type BlendOp uint8 + const BConstantAlpha + const BConstantColor + const BDstAlpha + const BDstColor + const BOne + const BOneMinusConstantAlpha + const BOneMinusConstantColor + const BOneMinusDstAlpha + const BOneMinusDstColor + const BOneMinusSrcAlpha + const BOneMinusSrcColor + const BSrcAlpha + const BSrcAlphaSaturate + const BSrcColor + const BZero + type BlendState struct + AlphaEq BlendEq + Color Color + DstAlpha BlendOp + DstRGB BlendOp + RGBEq BlendEq + SrcAlpha BlendOp + SrcRGB BlendOp + func (b BlendState) Compare(other BlendState) bool + type Boundable interface + Bounds func() lmath.Rect3 + type Bounds lmath.Rect3 + func (b Bounds) Bounds() lmath.Rect3 + type ByDist struct + Objects []*Object + Target lmath.Vec3 + func (b ByDist) Len() int + func (b ByDist) Less(ii, jj int) bool + func (b ByDist) Swap(i, j int) + type ByState []*Object + func (b ByState) Len() int + func (b ByState) Less(i, j int) bool + func (b ByState) Swap(i, j int) + type Camera struct + Projection Mat4 + func NewCamera() *Camera + func (c *Camera) Copy() *Camera + func (c *Camera) Destroy() + func (c *Camera) Project(p3 lmath.Vec3) (p2 lmath.Vec2, ok bool) + func (c *Camera) Reset() + func (c *Camera) SetOrtho(view image.Rectangle, near, far float64) + func (c *Camera) SetPersp(view image.Rectangle, fov, near, far float64) + type Canvas interface + Bounds func() image.Rectangle + Clear func(r image.Rectangle, bg Color) + ClearDepth func(r image.Rectangle, depth float64) + ClearStencil func(r image.Rectangle, stencil int) + Draw func(r image.Rectangle, o *Object, c *Camera) + MSAA func() bool + Precision func() Precision + QueryWait func() + Render func() + SetMSAA func(enabled bool) + type Cmp uint8 + const Always + const Equal + const Greater + const GreaterOrEqual + const Less + const LessOrEqual + const Never + const NotEqual + type Color struct + A float32 + B float32 + G float32 + R float32 + func (c Color) RGBA() (r, g, b, a uint32) + type CoordConv uint8 + const LocalToWorld + const ParentToWorld + const WorldToLocal + const WorldToParent + type DSFormat uint8 + const Depth16 + const Depth24 + const Depth24AndStencil8 + const Depth32 + const ZeroDSFormat + func (f DSFormat) DepthBits() uint8 + func (f DSFormat) IsCombined() bool + func (f DSFormat) IsDepth() bool + func (f DSFormat) IsStencil() bool + func (f DSFormat) StencilBits() uint8 + func (t DSFormat) String() string + type Destroyable interface + Destroy func() + type Downloadable interface + Download func(r image.Rectangle, complete chan image.Image) + type FaceCullMode uint8 + const BackFaceCulling + const FrontFaceCulling + const NoFaceCulling + func (f FaceCullMode) String() string + type GPUInfo struct + AlphaToCoverage bool + GLExtensions []string + GLMajor int + GLMinor int + GLSLMajor int + GLSLMaxFragmentInputs int + GLSLMaxVaryingFloats int + GLSLMaxVertexInputs int + GLSLMinor int + MaxTextureSize int + NPOT bool + Name string + OcclusionQuery bool + OcclusionQueryBits int + Vendor string + type Mat4 [4][4]float32 + func ConvertMat4(m lmath.Mat4) Mat4 + func (m Mat4) Mat4() lmath.Mat4 + type Mesh struct + AABB lmath.Rect3 + Attribs map[string]VertexAttrib + Bary []Vec3 + BaryChanged bool + Colors []Color + ColorsChanged bool + Dynamic bool + Indices []uint32 + IndicesChanged bool + KeepDataOnLoad bool + Loaded bool + TexCoords []TexCoordSet + Vertices []Vec3 + VerticesChanged bool + func NewMesh() *Mesh + func (m *Mesh) Bounds() lmath.Rect3 + func (m *Mesh) CalculateBounds() + func (m *Mesh) ClearData() + func (m *Mesh) Copy() *Mesh + func (m *Mesh) Destroy() + func (m *Mesh) GenerateBary() + func (m *Mesh) HasChanged() bool + func (m *Mesh) Reset() + type NativeMesh Destroyable + type NativeObject interface + SampleCount func() int + type NativeShader Destroyable + type NativeTexture interface + ChosenFormat func() TexFormat + type Object struct + CachedBounds *lmath.Rect3 + Meshes []*Mesh + OcclusionTest bool + Textures []*Texture + func NewObject() *Object + func (o *Object) Bounds() lmath.Rect3 + func (o *Object) Compare(other *Object) bool + func (o *Object) Copy() *Object + func (o *Object) Destroy() + func (o *Object) Reset() + type Precision struct + AlphaBits uint8 + BlueBits uint8 + DepthBits uint8 + GreenBits uint8 + RedBits uint8 + Samples int + StencilBits uint8 + type RTTConfig struct + Bounds image.Rectangle + Color *Texture + ColorFormat TexFormat + Depth *Texture + DepthFormat DSFormat + Samples int + Stencil *Texture + StencilFormat DSFormat + func (c RTTConfig) Valid() bool + type RTTFormats struct + ColorFormats []TexFormat + DepthFormats []DSFormat + Samples []int + StencilFormats []DSFormat + func (f RTTFormats) Choose(p Precision, compression bool) (color TexFormat, depth, stencil DSFormat) + func (f RTTFormats) ChooseConfig(p Precision, compression bool) RTTConfig + type Renderer interface + Clock func() *clock.Clock + GPUInfo func() GPUInfo + LoadMesh func(m *Mesh, done chan *Mesh) + LoadShader func(s *Shader, done chan *Shader) + LoadTexture func(t *Texture, done chan *Texture) + RenderToTexture func(cfg RTTConfig) Canvas + func Nil() Renderer + type Shader struct + Error []byte + GLSLFrag []byte + GLSLVert []byte + Inputs map[string]interface{} + KeepDataOnLoad bool + Loaded bool + Name string + func NewShader(name string) *Shader + func (s *Shader) ClearData() + func (s *Shader) Copy() *Shader + func (s *Shader) Destroy() + func (s *Shader) Reset() + type State struct + AlphaMode AlphaMode + Blend BlendState + DepthCmp Cmp + DepthTest bool + DepthWrite bool + Dithering bool + FaceCulling FaceCullMode + StencilBack StencilState + StencilFront StencilState + StencilTest bool + WriteAlpha bool + WriteBlue bool + WriteGreen bool + WriteRed bool + func (s State) Compare(other State) bool + type StencilOp uint8 + const SDecr + const SDecrWrap + const SIncr + const SIncrWrap + const SInvert + const SKeep + const SReplace + const SZero + type StencilState struct + Cmp Cmp + DepthFail StencilOp + DepthPass StencilOp + Fail StencilOp + ReadMask uint + Reference uint + WriteMask uint + func (s StencilState) Compare(other StencilState) bool + type TexCoord struct + U float32 + V float32 + type TexCoordSet struct + Changed bool + Slice []TexCoord + type TexFilter uint8 + const Linear + const LinearMipmapLinear + const LinearMipmapNearest + const Nearest + const NearestMipmapLinear + const NearestMipmapNearest + func (t TexFilter) Mipmapped() bool + func (t TexFilter) String() string + type TexFormat uint8 + const DXT1 + const DXT1RGBA + const DXT3 + const DXT5 + const RGB + const RGBA + const ZeroTexFormat + func (t TexFormat) Bits() (r, g, b, a uint8) + func (t TexFormat) String() string + type TexWrap uint8 + const BorderColor + const Clamp + const Mirror + const Repeat + func (t TexWrap) String() string + type Texture struct + BorderColor Color + Bounds image.Rectangle + Format TexFormat + KeepDataOnLoad bool + Loaded bool + MagFilter TexFilter + MinFilter TexFilter + Source image.Image + WrapU TexWrap + WrapV TexWrap + func NewTexture() *Texture + func (t *Texture) ClearData() + func (t *Texture) Copy() *Texture + func (t *Texture) Destroy() + func (t *Texture) Reset() + type Transform struct + func NewTransform() *Transform + func (t *Transform) Convert(c CoordConv) lmath.Mat4 + func (t *Transform) ConvertPos(p lmath.Vec3, c CoordConv) lmath.Vec3 + func (t *Transform) ConvertRot(r lmath.Vec3, c CoordConv) lmath.Vec3 + func (t *Transform) Copy() *Transform + func (t *Transform) Destroy() + func (t *Transform) Equals(other *Transform) bool + func (t *Transform) IsQuat() bool + func (t *Transform) LocalMat4() lmath.Mat4 + func (t *Transform) Mat4() lmath.Mat4 + func (t *Transform) New() *Transform + func (t *Transform) Parent() Transformable + func (t *Transform) Pos() lmath.Vec3 + func (t *Transform) Quat() lmath.Quat + func (t *Transform) Reset() + func (t *Transform) Rot() lmath.Vec3 + func (t *Transform) Scale() lmath.Vec3 + func (t *Transform) SetParent(p Transformable) + func (t *Transform) SetPos(p lmath.Vec3) + func (t *Transform) SetQuat(q lmath.Quat) + func (t *Transform) SetRot(r lmath.Vec3) + func (t *Transform) SetScale(s lmath.Vec3) + func (t *Transform) SetShear(s lmath.Vec3) + func (t *Transform) Shear() lmath.Vec3 + func (t *Transform) Transform() *Transform + type Transformable interface + Transform func() *Transform + type Vec3 struct + X float32 + Y float32 + Z float32 + func ConvertVec3(v lmath.Vec3) Vec3 + func (v Vec3) Vec3() lmath.Vec3 + type Vec4 struct + W float32 + X float32 + Y float32 + Z float32 + func ConvertVec4(v lmath.Vec4) Vec4 + func (v Vec4) Vec4() lmath.Vec4 + type VertexAttrib struct + Changed bool + Data interface{} + func (a VertexAttrib) Copy() VertexAttrib