video

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

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

Go to latest
Published: Sep 27, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package video takes care on the game display. It also creates the window using GLFW. It exports the Refresh callback used by the libretro implementation.

Index

Constants

View Source
const (
	// BIT_FORMAT_SHORT_5_5_5_1 has 5 bits R, 5 bits G, 5 bits B, 1 bit alpha
	BIT_FORMAT_SHORT_5_5_5_1 = iota
	// BIT_FORMAT_INT_8_8_8_8_REV has 8 bits R, 8 bits G, 8 bits B, 8 bit alpha
	BIT_FORMAT_INT_8_8_8_8_REV
	// BIT_FORMAT_SHORT_5_6_5 has 5 bits R, 6 bits G, 5 bits
	BIT_FORMAT_SHORT_5_6_5
)

Variables

View Source
var BPP int
View Source
var Framebuffer []byte
View Source
var PixelFormat uint32
View Source
var Rotation uint
View Source
var Width, Height, Pitch int32

Functions

func Refresh

func Refresh(data unsafe.Pointer, width int32, height int32, pitch int32)

Refresh the texture framebuffer

func Screenshot

func Screenshot(path string) error

func SetPixelFormat

func SetPixelFormat(format uint32) bool

SetPixelFormat is a callback passed to the libretro implementation. It allows the core or the game to tell us which pixel format should be used for the display.

func SetRotation

func SetRotation(rot uint) bool

SetRotation rotates the game image as requested by the core

Types

type Format

type Format func(data []byte, index int) color.RGBA

Jump to

Keyboard shortcuts

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