Documentation
¶
Index ¶
- Variables
- func AddMusic(name, dir string) *mix.Music
- func AddSound(name, dir string) *mix.Chunk
- func BindTexture(t Texture)
- func CheckShaderUpdate()
- func Clear(r, g, b, a float32)
- func ClearCanvas()
- func DegreesToRadians(a float32) float32
- func DrawCircle(x, y, r float64)
- func DrawImage(name string, x, y int, rotation float32, sx, sy float32)
- func DrawLine(x1, y1, x2, y2 float64)
- func DrawQuad(x, y, w, h, ox, oy int, rotation, corners float32)
- func DrawRectangle(x, y, w, h float64)
- func DrawRoundedQuad(x, y, w, h, ox, oy int, rotation, corners float32)
- func DrawRoundedRectangle(x, y, w, h, ox, oy int, rotation, corners float32)
- func Float32If(statement bool, t, f float32) float32
- func GL_Clear(r, g, b, a float32)
- func GetMouseX() int
- func GetMouseY() int
- func GetPathType(p string) string
- func IntIf(statement bool, t, f int) int
- func IsKeyDown(key string) bool
- func IsMouseDown(button string) bool
- func LuaDraw()
- func LuaKeyPressed(key string)
- func LuaKeyReleased(key string)
- func LuaMousePressed(x, y int, button string, clicks int)
- func LuaMouseReleased(x, y int, button string, clicks int)
- func LuaStart()
- func LuaUpdate(dt float32)
- func MouseButtonString(button uint8) string
- func NewCanvas(name string, w, h int) string
- func NewShader(vertexPath, fragmentPath string) (string, error)
- func NewState(w, h int, name string) state
- func Origin()
- func PlayMusic(name string, loops int)
- func PlaySound(name string, repetitions int) int
- func SDL_INIT_GL(window *sdl.Window, major, minor int)
- func SendBaseUniforms()
- func SetCanvas(c string)
- func SetColor(r, g, b, a int)
- func SetRotation(r float32)
- func Sigma(x int) int
- func Start(w, h int, name string)
- func StringIf(statement bool, t, f string) string
- func TimeSinceStart() int
- func UnbindTexture()
- func UniformFloat(name string, x float32)
- func UniformVec4(name string, x, y, z, w float32)
- func UseShader(name string)
- type Canvas
- type DrawFunc
- type Image
- type KeyPressed
- type KeyReleased
- type MousePressed
- type MouseReleased
- type Object
- type Shader
- type StartFunc
- type Texture
- type UpdateFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Canvases map[string]Canvas
Collections
View Source
var CurrentCanvas string
Graphical variables
View Source
var CurrentColor color
View Source
var Event events
View Source
var FPS float32
View Source
var Images map[string]Image
View Source
var KeyState []uint8
View Source
var LuaState *lua.State
View Source
var Music map[string]*mix.Music
View Source
var Renderer *sdl.Renderer
View Source
var Running bool
Loop
View Source
var ScaleX float32
View Source
var ScaleY float32
View Source
var Shaders map[string]Shader
View Source
var SinceStart int
View Source
var Sounds map[string]*mix.Chunk
View Source
var StartUpTime int
View Source
var State state
View Source
var TranslateX int
View Source
var TranslateY int
View Source
var Window *sdl.Window
Variables
Functions ¶
func BindTexture ¶
func BindTexture(t Texture)
func CheckShaderUpdate ¶
func CheckShaderUpdate()
func ClearCanvas ¶
func ClearCanvas()
func DrawCircle ¶
func DrawCircle(x, y, r float64)
func DrawRectangle ¶
func DrawRectangle(x, y, w, h float64)
func DrawRoundedQuad ¶
func DrawRoundedRectangle ¶
func GetPathType ¶
func IsMouseDown ¶
func LuaKeyPressed ¶
func LuaKeyPressed(key string)
func LuaKeyReleased ¶
func LuaKeyReleased(key string)
func LuaMousePressed ¶
func LuaMouseReleased ¶
func MouseButtonString ¶
func SDL_INIT_GL ¶
func SendBaseUniforms ¶
func SendBaseUniforms()
func SetRotation ¶
func SetRotation(r float32)
func UnbindTexture ¶
func UnbindTexture()
func UniformFloat ¶
func UniformVec4 ¶
Types ¶
type KeyPressed ¶
type KeyPressed func(string) // <---- Key
type KeyReleased ¶
type KeyReleased func(string) // <---- Key
type MousePressed ¶
type MouseReleased ¶
type StartFunc ¶
type StartFunc func() // <--- Thos happens after pancake have been started!
Declaring event function types, setting default functions and putting them in pancake.Event.EventName fashion...
type UpdateFunc ¶
type UpdateFunc func(float32) // <----- dt (Time)
Click to show internal directories.
Click to hide internal directories.