gl

package
v0.0.0-...-7fee067 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Texture     uint32
	Framebuffer uint32
)

Functions

func InitFrameBuffer

func InitFrameBuffer()

func InitGL

func InitGL()

func InitGLFW

func InitGLFW() *glfw.Window

func New

func New(emulator game.Console) game.Game

func Terminate

func Terminate()

Types

type Game

type Game struct {
	Width           int
	Height          int
	WindowTitle     string
	WindowScale     int
	BackgroundColor color.Color
	Console         game.Console
}

func (*Game) Reset

func (g *Game) Reset(interface{})

func (*Game) Run

func (g *Game) Run()

type Keyboard

type Keyboard struct{}

func (Keyboard) IsDownJustPressed

func (Keyboard) IsDownJustPressed() bool

func (Keyboard) IsDownPressed

func (Keyboard) IsDownPressed() bool

func (Keyboard) IsLeftJustPressed

func (Keyboard) IsLeftJustPressed() bool

func (Keyboard) IsLeftPressed

func (Keyboard) IsLeftPressed() bool

func (Keyboard) IsPrimaryJustPressed

func (Keyboard) IsPrimaryJustPressed() bool

func (Keyboard) IsPrimaryPressed

func (Keyboard) IsPrimaryPressed() bool

func (Keyboard) IsRightJustPressed

func (Keyboard) IsRightJustPressed() bool

func (Keyboard) IsRightPressed

func (Keyboard) IsRightPressed() bool

func (Keyboard) IsSecondaryJustPressed

func (Keyboard) IsSecondaryJustPressed() bool

func (Keyboard) IsSecondaryPressed

func (Keyboard) IsSecondaryPressed() bool

func (Keyboard) IsUpJustPressed

func (Keyboard) IsUpJustPressed() bool

func (Keyboard) IsUpPressed

func (Keyboard) IsUpPressed() bool

type Mouse

type Mouse struct{}

func (Mouse) CursorPosition

func (m Mouse) CursorPosition() (int, int)

func (Mouse) CursorPositionFloat

func (m Mouse) CursorPositionFloat() (float64, float64)

func (Mouse) IsLeftClickJustPressed

func (m Mouse) IsLeftClickJustPressed() bool

func (Mouse) IsLeftClickPressed

func (m Mouse) IsLeftClickPressed() bool

func (Mouse) IsRightClickJustPressed

func (m Mouse) IsRightClickJustPressed() bool

func (Mouse) IsRightClickPressed

func (m Mouse) IsRightClickPressed() bool

Jump to

Keyboard shortcuts

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