graphics

package
v0.0.0-...-3257b51 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindTexture2d

func BindTexture2d(textureNum, textureUnit int32)

func DrawNumber

func DrawNumber(color color.Color, xOffset, yOffset int, value float64, digits, decimal int, showSign bool, fontId FontID)

func DrawString

func DrawString(color color.Color, xOffset, yOffset int, text string, wordWrapWidth []int32, fontId FontID)

func DrawTranslucentDarkBox

func DrawTranslucentDarkBox(left, top, right, bottom int)

func GenerateTextureNumbers

func GenerateTextureNumbers(count int) []int32

func GetFontDimensions

func GetFontDimensions(fontId FontID) (charWidth, charHeight int, digitsOnly bool)

func GetTexture

func GetTexture(textureId TextureID) int

func LocalToWorld

func LocalToWorld(x, y, z float64) (lat, lon, alt float64)

func MeasureString

func MeasureString(fontId FontID, text string) float32

func SetGraphicsState

func SetGraphicsState(enableFog bool, numberTexUnits int, enableLighting, enableAlphaTesting, enableAlphaBlending, enableDepthTesting, enableDepthWriting bool)

func WorldToLocal

func WorldToLocal(lat, lon, alt float64) (x, y, z float64)

Types

type FontID

type FontID int
const (
	Font_Basic           FontID = 0
	Font_Menus           FontID = 1
	Font_Metal           FontID = 2
	Font_Led             FontID = 3
	Font_LedWide         FontID = 4
	Font_PanelHUD        FontID = 5
	Font_PanelEFIS       FontID = 6
	Font_PanelGPS        FontID = 7
	Font_RadiosGA        FontID = 8
	Font_RadiosBC        FontID = 9
	Font_RadiosHM        FontID = 10
	Font_RadiosGANarrow  FontID = 11
	Font_RadiosBCNarrow  FontID = 12
	Font_RadiosHMNarrow  FontID = 13
	Font_Timer           FontID = 14
	Font_FullRound       FontID = 15
	Font_SmallRound      FontID = 16
	Font_Menus_Localized FontID = 17
	Font_Proportional    FontID = 18
)

type TextureID

type TextureID int
const (
	Tex_GeneralInterface TextureID = 0
	Tex_AircraftPaint    TextureID = 1
	Tex_AircraftLiteMap  TextureID = 2
)

Jump to

Keyboard shortcuts

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