Versions in this module Expand all Collapse all v1 v1.0.1 Jan 14, 2025 Changes in this version + var ColorModel = color.ModelFunc(colorModel) + var DefaultBlendState = BlendState + var DefaultStencilState = StencilState + type AlphaMode uint8 + const AlphaBlend + const AlphaToCoverage + const BinaryAlpha + const NoAlpha + func (i 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 Camera interface + Projection func() Mat4 + Update func(b image.Rectangle) + 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 (i DSFormat) String() string + type Destroyable interface + Destroy func() + type Device interface + Clock func() *clock.Clock + Info func() DeviceInfo + 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() Device + type DeviceInfo struct + AlphaToCoverage bool + DepthClamp bool + GL *GLInfo + GLSL *GLSLInfo + MaxTextureSize int + NPOT bool + Name string + OcclusionQuery bool + OcclusionQueryBits int + TexWrapBorderColor bool + Vendor string + type Downloadable interface + Download func(r image.Rectangle, complete chan image.Image) + type FaceCullMode uint8 + const BackFaceCulling + const FrontFaceCulling + const NoFaceCulling + func (i FaceCullMode) String() string + type GLInfo struct + Extensions []string + MajorVersion int + MinorVersion int + ReleaseVersion int + VendorVersion string + func (g *GLInfo) String() string + func (g *GLInfo) Version() string + type GLSLInfo struct + MajorVersion int + MaxFragmentInputs int + MaxVaryingFloats int + MaxVertexInputs int + MinorVersion int + ReleaseVersion int + func (g *GLSLInfo) String() string + func (g *GLSLInfo) Version() string + type GLSLSources struct + Fragment []byte + Vertex []byte + func (s *GLSLSources) Copy() *GLSLSources + 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 + NativeMesh Destroyable + Normals []Vec3 + NormalsChanged bool + TexCoords []TexCoordSet + Vertices []Vec3 + VerticesChanged bool + func NewMesh() *Mesh + func (m *Mesh) Append(other *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() + func (m *Mesh) State(s *MeshState) + type MeshState struct + Attribs map[string]bool + Bary bool + Colors bool + Indices bool + Normals bool + TexCoords []bool + Vertices bool + func (s *MeshState) Diff(a, b *MeshState) bool + func (s *MeshState) Equals(other *MeshState) bool + type NativeObject interface + SampleCount func() int + 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 Primitive uint8 + const Lines + const Points + const Triangles + func (i Primitive) String() string + 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 Shader struct + Error []byte + GLSL *GLSLSources + Inputs map[string]interface{} + KeepDataOnLoad bool + Loaded bool + Name string + NativeShader Destroyable + 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 + DepthClamp bool + 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 NewState() *State + func (s *State) Compare(other *State) bool + func (s *State) Copy() *State + func (s *State) Destroy() + func (s *State) Reset() + 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 (i TexFilter) String() string + func (t TexFilter) Mipmapped() bool + type TexFormat uint8 + const DXT1 + const DXT1RGBA + const DXT3 + const DXT5 + const RGB + const RGBA + const ZeroTexFormat + func (i TexFormat) String() string + func (t TexFormat) Bits() (r, g, b, a uint8) + type TexWrap uint8 + const BorderColor + const Clamp + const Mirror + const Repeat + func (i TexWrap) String() string + type Texture struct + BorderColor Color + Bounds image.Rectangle + Dynamic bool + 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