Documentation
¶
Overview ¶
Package renderer implements the scene renderer.
Index ¶
- type ProgSpecs
- type Renderer
- type ShaderSpecs
- type Shaman
- func (sm *Shaman) AddChunk(name, source string) error
- func (sm *Shaman) AddDefaultShaders() error
- func (sm *Shaman) AddProgram(name, vertexName, fragName string) error
- func (sm *Shaman) AddShader(name, source string) error
- func (sm *Shaman) GenProgram(specs *ShaderSpecs) (*gls.Program, error)
- func (sm *Shaman) Init(gs *gls.GLS)
- func (sm *Shaman) SetProgram(specs *ShaderSpecs) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Renderer ¶
type Renderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func (*Renderer) AddDefaultShaders ¶
func (*Renderer) AddProgram ¶
type ShaderSpecs ¶
type ShaderSpecs struct {
Name string // Shader name
Version string // GLSL version
UseLights material.UseLights
AmbientLightsMax int // Current number of ambient lights
DirLightsMax int // Current Number of directional lights
PointLightsMax int // Current Number of point lights
SpotLightsMax int // Current Number of spot lights
MatTexturesMax int // Current Number of material textures
}
func (*ShaderSpecs) Compare ¶
func (ss *ShaderSpecs) Compare(other *ShaderSpecs) bool
type Shaman ¶
type Shaman struct {
// contains filtered or unexported fields
}
func (*Shaman) AddDefaultShaders ¶
func (*Shaman) AddProgram ¶
func (*Shaman) GenProgram ¶
func (sm *Shaman) GenProgram(specs *ShaderSpecs) (*gls.Program, error)
Generates shader program from the specified specs
func (*Shaman) SetProgram ¶
func (sm *Shaman) SetProgram(specs *ShaderSpecs) (bool, error)
SetShader set the shader to satify the specified specs Returns an indication if the current shader has changed and an error
Click to show internal directories.
Click to hide internal directories.