Beispiel #1
0
func (ff *FontFace) GetText(text string) (t *core.Texture, err error) {
	var (
		img image.Image
	)
	if img, err = ff.GetImage(text); err != nil {
		return
	}
	t, err = core.GetTexture(img, gl.NEAREST)
	return
}
func (l *TextInstanceList) generateTexture() (err error) {
	var (
		texture *core.Texture
	)
	if texture, err = core.GetTexture(
		l.sheet.Image(),
		core.SmoothingLinear,
	); err != nil {
		return
	}
	l.sheet.SetTexture(texture)
	return
}