attribute

package
v0.0.0-...-0518d83 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Int         = Type(gl.INT)
	UInt        = Type(gl.UNSIGNED_INT)
	Float       = Type(gl.FLOAT)
	Vec2        = Type(gl.FLOAT_VEC2)
	Vec3        = Type(gl.FLOAT_VEC3)
	Vec4        = Type(gl.FLOAT_VEC4)
	Mat2        = Type(gl.FLOAT_MAT2)
	Mat23       = Type(gl.FLOAT_MAT2x3)
	Mat24       = Type(gl.FLOAT_MAT2x4)
	Mat3        = Type(gl.FLOAT_MAT3)
	Mat32       = Type(gl.FLOAT_MAT3x2)
	Mat34       = Type(gl.FLOAT_MAT3x4)
	Mat4        = Type(gl.FLOAT_MAT4)
	Mat42       = Type(gl.FLOAT_MAT4x2)
	Mat43       = Type(gl.FLOAT_MAT4x3)
	ColorPacked = Type(0xFFFFFFF0)
	Vec2Packed  = Type(0xFFFFFFF1)
)

List of all possible attribute types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Format

type Format []VertexAttribute

Format defines names and types of OpenGL attributes (vertex format, uniform format, etc.).

Example:

Format{{"position", Vec2}, {"color", Vec4}, {"texCoord": Vec2}}

func (Format) Size

func (af Format) Size() int

Size returns the total size of all attributes of the Format.

type Type

type Type int

Type represents the type of an OpenGL attribute.

func (Type) Components

func (at Type) Components() int

func (Type) InternalType

func (at Type) InternalType() int

func (Type) Normalize

func (at Type) Normalize() bool

func (Type) Size

func (at Type) Size() int

Size returns the size of a type in bytes.

type VertexAttribute

type VertexAttribute struct {
	Name     string
	Type     Type
	Location int32
}

VertexAttribute represents an arbitrary OpenGL attribute, such as a vertex attribute or a shader uniform attribute.

Jump to

Keyboard shortcuts

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