rl

package
v0.1.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Black  = Color{0, 0, 0, 255}
	Red    = Color{255, 0, 0, 255}
	White  = Color{255, 255, 255, 255}
	Yellow = Color{255, 255, 0, 255}
)

Functions

func BeginDrawing

func BeginDrawing()

func BeginMode2D

func BeginMode2D(camera Camera)

func ClearBackground

func ClearBackground(color Color)

func CloseWindow

func CloseWindow()

func DrawText

func DrawText(text string, posX, posY, fontSize int32, color Color)

func DrawTexture

func DrawTexture(texture Texture, posX, posY, tX, tY, w, h, rot float32)

func EndDrawing

func EndDrawing()

func EndMode2D

func EndMode2D()

func GetFPS

func GetFPS() int32

func GetFrameTime

func GetFrameTime() float32

func InitWindow

func InitWindow(width, height int32, title string)

func IsKeyDown

func IsKeyDown(key int32) bool

func IsWindowReady

func IsWindowReady() bool

func SetTargetFPS

func SetTargetFPS(fps int)

func UnloadTexture

func UnloadTexture(texture Texture)

func WindowShouldClose

func WindowShouldClose() bool

Types

type AudioStream

type AudioStream struct {
	Buffer     *C.rAudioBuffer
	SampleRate uint32
	SampleSize uint32
	Channels   uint32
	// contains filtered or unexported fields
}

type Camera

type Camera struct {
	Offset   Vector
	Target   Vector
	Rotation float32
	Zoom     float32
}

type Color

type Color struct {
	R uint8
	G uint8
	B uint8
	A uint8
}

type Music

type Music struct {
	Stream      AudioStream
	SampleCount uint32
	Looping     bool
	CtxType     int32
	CtxData     unsafe.Pointer
}

type Rectangle

type Rectangle struct {
	X      float32
	Y      float32
	Width  float32
	Height float32
}

type Sound

type Sound struct {
	Stream      AudioStream
	SampleCount uint32
	// contains filtered or unexported fields
}

type Texture

type Texture struct {
	ID      uint32
	Width   int32
	Height  int32
	Mipmaps int32
	Format  int32
}

func LoadTexture

func LoadTexture(path string) Texture

type Vector

type Vector struct {
	X float32
	Y float32
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL