Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Atlas ¶
type Atlas struct {
Colour2D
}
Atlas A texture atlas implementation.
type Colour2D ¶
type Colour2D struct {
Texture2D
// contains filtered or unexported fields
}
Colour2D is a material defined by raw/computed colour data, rather than loaded vtf data
func (*Colour2D) PixelDataForFrame ¶
PixelDataForFrame returns raw colour data for specific animation frame
type Cubemap ¶
Cubemap is a 6-sided edgeless texture that can be mapped to a cube, Used mainly for pre-computed reflections
func NewCubemap ¶
NewCubemap returns a new cubemap material
type ITexture ¶
type ITexture interface {
Width() int
Height() int
Format() uint32
PixelDataForFrame(int) []byte
FilePath() string
Thumbnail() []byte
}
ITexture Interface for a GPU texture
type Lightmap ¶
type Lightmap struct {
Colour2D
}
Lightmap is a material used for lighting a face
func LightmapFromColorRGBExp32 ¶
func LightmapFromColorRGBExp32(width int, height int, colorMaps []common.ColorRGBExponent32) *Lightmap
LightmapFromColorRGBExp32 creates a lightmap from BSP stored colour data
type Texture2D ¶
type Texture2D struct {
// contains filtered or unexported fields
}
Texture2D is a generic GPU material struct
func NewTexture2D ¶
NewTexture2D returns a new texture from Vtf
func (*Texture2D) PixelDataForFrame ¶
PixelDataForFrame get raw colour data for this frame