graphics

package
Version: v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShaderImageNum = 4

	// PreservedUniformVariablesNum represents the number of preserved uniform variables.
	// Any shaders in Ebiten must have these uniform variables.
	PreservedUniformVariablesNum = 1 +
		1 +
		1 +
		1 +
		1 +
		1 +
		1 // the texture source region's size

	DestinationTextureSizeUniformVariableIndex         = 0
	TextureSizesUniformVariableIndex                   = 1
	TextureDestinationRegionOriginUniformVariableIndex = 2
	TextureDestinationRegionSizeUniformVariableIndex   = 3
	TextureSourceOffsetsUniformVariableIndex           = 4
	TextureSourceRegionOriginUniformVariableIndex      = 5
	TextureSourceRegionSizeUniformVariableIndex        = 6
)
View Source
const (
	IndicesNum     = (1 << 16) / 3 * 3 // Adjust num for triangles.
	VertexFloatNum = 8
)

Variables

This section is empty.

Functions

func InternalImageSize

func InternalImageSize(x int) int

InternalImageSize returns a nearest appropriate size as an internal image.

func QuadIndices

func QuadIndices() []uint16

func QuadVertices

func QuadVertices(sx0, sy0, sx1, sy1 float32, a, b, c, d, tx, ty float32, cr, cg, cb, ca float32) []float32

QuadVertices returns a float32 slice for a quadrangle. QuadVertices returns a slice that never overlaps with other slices returned this function, and users can do optimization based on this fact.

func Vertices

func Vertices(n int) []float32

Vertices returns a float32 slice for n vertices. Vertices returns a slice that never overlaps with other slices returned this function, and users can do optimization based on this fact.

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto