sdl2utils

package module
Version: v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2021 License: BSD-3-Clause Imports: 4 Imported by: 8

README

sdl2utils

Helper functions for using SDL2 and Go

General info

  • License: BSD
  • Version: 0.0.2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HideCursor

func HideCursor()

HideCursor hides the mouse cursor

func IsFullscreen

func IsFullscreen(window *sdl.Window) bool

Fullscreen checks if the current window has the WINDOW_FULLSCREEN or WINDOW_FULLSCREEN_DESKTOP flag set.

func RendererToImage

func RendererToImage(renderer *sdl.Renderer) (*image.RGBA, error)

RendererToImage converts a *sdl.Renderer to an *image.RGBA image

func Screenshot

func Screenshot(renderer *sdl.Renderer, filename string, overwrite bool) error

Screenshot saves the contents of the given *sdl.Renderer to a PNG file. Set overwrite to true for overwriting any existing files.

func ShowCursor

func ShowCursor()

ShowCursor shows the mouse cursor

func ToggleFullscreen

func ToggleFullscreen(window *sdl.Window) bool

ToggleFullscreen switches to fullscreen, or back. Returns true if the mode has been switched to fullscreen. Also toggles the visibility of the mouse cursor.

Types

This section is empty.

Jump to

Keyboard shortcuts

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