Documentation ¶
Overview ¶
Package shaders contains the several shaders used by the engine
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddProgram ¶
AddProgram adds a shader program to the default registry of programs. Currently up to 3 shaders: vertex, fragment and geometry (optional) can be specified.
func AddShader ¶
AddShader add a shader to default shaders registry. The specified name can be used when adding programs to the registry
func Programs ¶
func Programs() []string
Programs returns list with the names of all programs currently in the default shaders registry.
func ShaderSource ¶
ShaderSource returns the source code of the specified shader in the default shaders registry. If the name is not found an empty string is returned
Types ¶
type ProgramInfo ¶
type ProgramInfo struct { Vertex string // Vertex shader name Fragment string // Fragment shader name Geometry string // Geometry shader name (optional) }
ProgramInfo contains information for a registered shader program
func GetProgramInfo ¶
func GetProgramInfo(name string) ProgramInfo
GetProgramInfo returns ProgramInfo struct for the specified program name in the default shaders registry