Versions in this module Expand all Collapse all v0 v0.3.1 Oct 18, 2017 v0.3.0 Jan 9, 2017 Changes in this version + const MaxCustomTextures + type Material struct + CustomTex [MaxCustomTextures]graphics.Texture + DiffuseColor mgl.Vec4 + DiffuseTex graphics.Texture + NormalsTex graphics.Texture + Shader *RenderShader + Shininess float32 + SpecularColor mgl.Vec4 + SpecularTex graphics.Texture + func NewMaterial() *Material type Renderable + Material *Material v0.2.0 Sep 7, 2016 Changes in this version + const MaxRenderableTextures type Renderable + func CreateLineV(a, b mgl.Vec3) *Renderable type RenderableCore + Tex [MaxRenderableTextures]graphics.Texture v0.1.0 Aug 27, 2016 Changes in this version + const FaceBack + const FaceBottom + const FaceFront + const FaceLeft + const FaceRight + const FaceTop + const X + const Y + const Z + func DebugCheckForError(msg string) + func DegreesToRadians(x float64) float64 + func GenerateMipmaps(t graphics.Texture) + func GetGraphics() graphics.GraphicsProvider + func LoadImageToTexture(filePath string) (graphics.Texture, error) + func LoadPNGToTexture(data []byte) (graphics.Texture, error) + func LoadRGBAToTexture(rgba []byte, imageSize int32) graphics.Texture + func LoadRGBAToTextureExt(rgba []byte, imageSize, magFilter, minFilter, wrapS, wrapT int32) graphics.Texture + func LoadRGBToTexture(rgb []byte, imageSize int32) graphics.Texture + func LoadRGBToTextureExt(rgb []byte, imageSize, magFilter, minFilter, wrapS, wrapT int32) graphics.Texture + func MapUvToCubemap(side int, s, t float32) (float32, float32) + func RadiansToDegrees(x float64) float64 + func SetGraphics(g graphics.GraphicsProvider) + type Camera interface + GetPosition func() mgl.Vec3 + GetViewMatrix func() mgl.Mat4 + type OrbitCamera struct + func NewOrbitCamera(target mgl.Vec3, vertAngle float32, distance float32, rotation float32) *OrbitCamera + func (c *OrbitCamera) AddDistance(delta float32) + func (c *OrbitCamera) GetDistance() float32 + func (c *OrbitCamera) GetForwardVector() mgl.Vec3 + func (c *OrbitCamera) GetPosition() mgl.Vec3 + func (c *OrbitCamera) GetTarget() mgl.Vec3 + func (c *OrbitCamera) GetViewMatrix() mgl.Mat4 + func (c *OrbitCamera) Rotate(delta float32) + func (c *OrbitCamera) RotateVertical(delta float32) + func (c *OrbitCamera) SetDistance(d float32) + func (c *OrbitCamera) SetTarget(t mgl.Vec3) + type PreLinkBinder func(p graphics.Program) + type Rectangle3D struct + Bottom mgl.Vec3 + Top mgl.Vec3 + func GetBoundingRect(verts []float32) (r Rectangle3D) + func (rect *Rectangle3D) DeltaX() float32 + func (rect *Rectangle3D) DeltaY() float32 + func (rect *Rectangle3D) DeltaZ() float32 + type RenderShader struct + Prog graphics.Program + func LoadShaderProgram(vertShader, fragShader string, prelink PreLinkBinder) (*RenderShader, error) + func LoadShaderProgramFromFiles(baseFilename string, prelink PreLinkBinder) (*RenderShader, error) + func NewRenderShader(p graphics.Program) *RenderShader + func (rs *RenderShader) AssertAttribsExist(names ...string) error + func (rs *RenderShader) AssertUniformsExist(names ...string) error + func (rs *RenderShader) Destroy() + func (rs *RenderShader) GetAttribLocation(name string) int32 + func (rs *RenderShader) GetUniformLocation(name string) int32 + type Renderable struct + AnimationTime float32 + BoundingRect Rectangle3D + Children []*Renderable + Core *RenderableCore + FaceCount uint32 + IsGroup bool + IsVisible bool + LocalRotation mgl.Quat + Location mgl.Vec3 + Parent *Renderable + Rotation mgl.Quat + Scale mgl.Vec3 + func CreateCube(xmin, ymin, zmin, xmax, ymax, zmax float32) *Renderable + func CreateCubeMappedSphere(gridSize int, radius float32, cubemapUvs bool) *Renderable + func CreateFromGombz(srcMesh *gombz.Mesh) *Renderable + func CreateLine(x0, y0, z0, x1, y1, z1 float32) *Renderable + func CreatePlaneXY(x0, y0, x1, y1 float32) *Renderable + func CreatePlaneXZ(x0, z0, x1, z1 float32) *Renderable + func CreateSphere(radius float32, rings int, sectors int) *Renderable + func CreateWireframeCircle(xmin, ymin, zmin, radius float32, segments int, axis int) *Renderable + func CreateWireframeConeSegmentXZ(xmin, ymin, zmin, bottomRadius, topRadius, length float32, ...) *Renderable + func CreateWireframeCube(xmin, ymin, zmin, xmax, ymax, zmax float32) *Renderable + func NewRenderable() *Renderable + func (r *Renderable) AddChild(child *Renderable) + func (r *Renderable) Clone() *Renderable + func (r *Renderable) Destroy() + func (r *Renderable) GetTransformMat4() mgl.Mat4 + func (r *Renderable) HasSkeleton() bool + func (r *Renderable) HasSkeletonDeep() bool + func (r *Renderable) Map(f RenderableMapF) + type RenderableCore struct + BoneFidsVBO graphics.Buffer + BoneFidsVBOOffset int + BoneWeightsVBO graphics.Buffer + BoneWeightsVBOOffset int + ComboVBO1 graphics.Buffer + ComboVBO1Offset int + ComboVBO2 graphics.Buffer + ComboVBO2Offset int + DiffuseColor mgl.Vec4 + ElementsVBO graphics.Buffer + IsDestroyed bool + NormsVBO graphics.Buffer + NormsVBOOffset int + Shader *RenderShader + Shininess float32 + Skeleton *Skeleton + SpecularColor mgl.Vec4 + TangentsVBO graphics.Buffer + TangentsVBOOffset int + Tex0 graphics.Texture + Tex1 graphics.Texture + UvVBO graphics.Buffer + UvVBOOffset int + VBOStride int32 + Vao uint32 + VaoInitialized bool + VertVBO graphics.Buffer + VertVBOOffset int + func NewRenderableCore() *RenderableCore + func (r *RenderableCore) DestroyCore() + type RenderableMapF func(r *Renderable) + type Skeleton struct + Animations []gombz.Animation + Bones []gombz.Bone + PoseTransforms []mgl.Mat4 + func NewSkeleton(bones []gombz.Bone, animations []gombz.Animation) *Skeleton + func (skel *Skeleton) Animate(animation *gombz.Animation, time float32) + type TextureArray struct + Texture graphics.Texture + TextureIndexes TextureArrayIndexes + func NewTextureArray(texsize int32, count int32) *TextureArray + func (texArray *TextureArray) LoadImageAsPNG(texName string, data []byte, size int32, arrayIndex int32) error + func (texArray *TextureArray) LoadImageFromFiles(texName string, filePath string, size int32, arrayIndex int32) error + func (texArray *TextureArray) LoadImagesFromFiles(filepaths map[string]string, size int32, startingIndex int32) error + type TextureArrayIndexes map[string]int32 + type TextureManager struct + func NewTextureManager() *TextureManager + func (tm *TextureManager) Destroy() + func (tm *TextureManager) GetTexture(keyToUse string) (graphics.Texture, bool) + func (tm *TextureManager) LoadTexture(keyToUse string, path string) (graphics.Texture, error) + type YawPitchCamera struct + func NewYawPitchCamera(eyePosition mgl.Vec3) *YawPitchCamera + func (c *YawPitchCamera) GetForwardVector() mgl.Vec3 + func (c *YawPitchCamera) GetPitch() float32 + func (c *YawPitchCamera) GetPosition() mgl.Vec3 + func (c *YawPitchCamera) GetRoll() float32 + func (c *YawPitchCamera) GetRotation() mgl.Quat + func (c *YawPitchCamera) GetSideVector() mgl.Vec3 + func (c *YawPitchCamera) GetUpVector() mgl.Vec3 + func (c *YawPitchCamera) GetViewMatrix() mgl.Mat4 + func (c *YawPitchCamera) GetYaw() float32 + func (c *YawPitchCamera) LookAt(target mgl.Vec3, distance float32) + func (c *YawPitchCamera) LookAtDirect(target mgl.Vec3) + func (c *YawPitchCamera) SetPosition(x, y, z float32) + func (c *YawPitchCamera) SetRotation(q mgl.Quat) + func (c *YawPitchCamera) SetYawAndPitch(yaw, pitch float32) + func (c *YawPitchCamera) UpdatePitch(delta float32) + func (c *YawPitchCamera) UpdatePosition(dX, dY, dZ float32) + func (c *YawPitchCamera) UpdateRoll(delta float32) + func (c *YawPitchCamera) UpdateYaw(delta float32)