sdlutil

package
v0.0.0-...-0ae1e1f Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: MIT Imports: 3 Imported by: 30

Documentation

Overview

Utility functions to complement Simple DirectMedia Layer (www.libsdl.org)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetResourcePath

func GetResourcePath(pathcomponents ...string) string

Returns the concatenation $BASE/path/compo/nents where $BASE is sdl.GetBasePath() (which is usually the location of the binary).

func RWFromReader

func RWFromReader(r io.Reader) *sdl.RWops

Even though the argument is only required to implement io.Reader, this function will return an sdl.RWops that offers the functions corresponding to ALL of the following interfaces if supported by r:

io.Reader
io.Writer
io.Seeker
io.Closer
sdl.Sizer

If something goes wrong in the SDL library (such as an out of memory on the C heap), this function calls panic(sdl.GetError()).

func RWFromWriter

func RWFromWriter(w io.Writer) *sdl.RWops

Even though the argument is only required to implement io.Writer, this function will return an sdl.RWops that offers the functions corresponding to ALL of the following interfaces if supported by w:

io.Reader
io.Writer
io.Seeker
io.Closer
sdl.Sizer

If something goes wrong in the SDL library (such as an out of memory on the C heap), this function calls panic(sdl.GetError()).

Types

This section is empty.

Jump to

Keyboard shortcuts

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