example

command
v0.0.0-...-ec72f08 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: MIT Imports: 10 Imported by: 0

README

fontdraw-simple

This short program opens an OpenGL window using GLFW and draws some example text within the window. In this case, the rune atlas was saved to a gob, and its image was converted to a SDF representation (which allows for cleaner scaling given one input font size). Because the source atlas was generated at 4X size, note the call to ScaleNumbers(). To create an SDF atlas yourself, see package isdf.

In action:

img1

fontdraw-immediate

This slightly more robust example shows immediate mode drawing, where the mesh used to render text is generated every frame and streamed to the GPU. It's more costly than retained mode rendering, but it's easy to work with. The text has been animated to show off one potential usability advantage to regenerating the text mesh every frame.

In action:

img1

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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