errnoh / sdl

This package provides simplified bindings for the SDL library version 2.0.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WIP

This project is a work in progress. The implementation is incomplete and subject to change. The documentation can be inaccurate.

win

Package win provides the core functionality required for window creation, drawing and event handling. The window events are defined in a dedicated package located at:

The library uses a small subset of the features provided by SDL version 2.0. Support for multiple windows has intentionally been left out to simplify the API.

Documentation

Documentation provided by GoDoc.

  • sdl
    • font: handles text rendering based on the size, style and color of fonts.
    • win: handles window creation, drawing and events.
  • we: specifies the types and constants commonly used for window events.

Installation

Install the SDL library version 2.0 and run:

go get github.com/mewmew/sdl/win

Install the SDL_ttf library version 2.0 and run:

go get github.com/mewmew/sdl/font

Examples

The simple command demonstrates how to draw surfaces using the Draw and DrawRect methods. It also gives an example of a basic event loop.

go get github.com/mewmew/sdl/examples/simple

Screenshot - simple

The fonts command demonstrates how to render text using TTF fonts.

go get github.com/mewmew/sdl/examples/fonts

Screenshot - fonts

public domain

This code is hereby released into the public domain.

About

This package provides simplified bindings for the SDL library version 2.0.


Languages

Language:Go 100.0%