Documentation ¶
Index ¶
- func CompileShader(src string, sType uint32) (uint32, error)
- func CreateProgram(shaders []uint32) (uint32, error)
- func CreateVAO(vertices []Vertex3) uint32
- func InitGl()
- func InitGlfw(width int, height int, title string) *glfw.Window
- func NewFrame(window *glfw.Window, color mgl32.Vec4)
- type Action
- type InputManager
- type Vertex2
- type Vertex3
- func GetCircleVertices3(r float32, vertices int) []Vertex3
- func GetCubicHexahedronVertices3(x, y, z float32) []Vertex3
- func GetCylinderVertices3(h float32, rBottom float32, rTop float32, vertices int) (side, top, bottom []Vertex3)
- func GetPipeVertices3(h float32, rIn float32, rOut float32, vertices int) (sideIn, sideOut, top, bottom []Vertex3)
- func GetPlaneVertices3(h int, w int, l int) []Vertex3
- func GetRingVerticies3(rIn float32, rOut float32, vertices int) []Vertex3
- func GetSemiSphereVertices3(r float32, vertices int) (side, top, bottom []Vertex3)
- func GetSphereVertices3(r float32, numVertex int) (sphere, top, bottom []Vertex3)
- type Vertex5
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompileShader ¶
CompileShader is the function that compiles a shader
func CreateProgram ¶
CreateProgram Creates and returns a program with saders
Types ¶
type InputManager ¶
type InputManager struct {
// contains filtered or unexported fields
}
InputManager ...
func NewInputManager ¶
func NewInputManager() *InputManager
NewInputManager is the Function that creates an input manager
func (*InputManager) CheckpointCursorChange ¶
func (im *InputManager) CheckpointCursorChange()
CheckpointCursorChange updates the publicly available Cursor() and CursorChange() methods to return the current Cursor and change since last time this method was called.
func (*InputManager) Cursor ¶
func (im *InputManager) Cursor() mgl64.Vec2
Cursor returns the value of the cursor at the last time that CheckpointCursorChange() was called.
func (*InputManager) CursorChange ¶
func (im *InputManager) CursorChange() mgl64.Vec2
CursorChange returns the amount of change in the underlying cursor since the last time CheckpointCursorChange was called
func (*InputManager) IsActive ¶
func (im *InputManager) IsActive(a Action) bool
IsActive returns whether the given Action is currently active
type Vertex3 ¶
type Vertex3 struct {
// contains filtered or unexported fields
}
Vertex3 ...
func GetCircleVertices3 ¶
GetCircleVertices3 ...
func GetCubicHexahedronVertices3 ¶
GetCubicHexahedronVertices3 ...
func GetCylinderVertices3 ¶
func GetCylinderVertices3(h float32, rBottom float32, rTop float32, vertices int) (side, top, bottom []Vertex3)
GetCylinderVertices3 ...
func GetPipeVertices3 ¶
func GetPipeVertices3(h float32, rIn float32, rOut float32, vertices int) (sideIn, sideOut, top, bottom []Vertex3)
GetPipeVertices3 ...
func GetPlaneVertices3 ¶
GetPlaneVertices3 ...
func GetRingVerticies3 ¶
GetRingVerticies3 ...
func GetSemiSphereVertices3 ¶
GetSemiSphereVertices3 ...
func GetSphereVertices3 ¶
GetSphereVertices3 ...