Documentation ¶
Overview ¶
Package shader contains the several shaders used by the engine
File generated by G3NSHADERS. Do not edit. To regenerate this file install 'g3nshaders' and execute: 'go generate' in this folder.
Index ¶
- func AddInclude(name string, source string)
- func AddProgram(name string, vertex string, frag string, others ...string)
- func AddShader(name string, source string)
- func IncludeSource(name string) string
- func Includes() []string
- func Programs() []string
- func ShaderSource(name string) string
- func Shaders() []string
- type ProgramInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddInclude ¶
AddInclude adds a chunk of shader code to the default shaders registry which can be included in a shader using the "#include <name>" directive
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 ¶
AddShaders add a shader to default shaders registry. The specified name can be used when adding programs to the registry
func IncludeSource ¶
GetInclude returns the source code of the specified shader include chunk. If the name is not found an empty string is returned
func Includes ¶
func Includes() []string
Includes returns list with the names of all include chunks currently in the default shaders 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 (maybe an empty string) }
ProgramInfo contains information for a registered shader program
func GetProgramInfo ¶
func GetProgramInfo(name string) ProgramInfo
GetProgram returns ProgramInfo struct for the specified program name in the default shaders registry