sdl

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 0 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sdl provides SDL2-based audio and video output for go-media.

This package requires SDL2 to be installed.

The package provides:

  • Context: SDL initialization and event loop management
  • Window: Video rendering using SDL windows and textures
  • Audio: Audio playback using SDL audio devices
  • Player: High-level player combining video and audio

Example usage:

ctx, err := sdl.New(sdl.INIT_VIDEO | sdl.INIT_AUDIO)
if err != nil {
    log.Fatal(err)
}
defer ctx.Close()

window, err := ctx.NewWindow("Video Player", 1920, 1080)
if err != nil {
    log.Fatal(err)
}
defer window.Close()

ctx.Run(context.Background())

Jump to

Keyboard shortcuts

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