Documentation
¶
Index ¶
- func LoadFragmentShader(fragmentShaderPath string) (string, error)
- func LoadTextureData(path string) (texture *image.RGBA, err error)
- type Definition
- type Engine
- type FilterStage
- type ScalarTypeName
- type Texture
- type TextureDefinition
- type TextureFilterType
- type Uniform
- type UniformDefinition
- type UniformType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadFragmentShader ¶
Types ¶
type Definition ¶
type Definition struct {
Render struct {
Width int
Height int
}
Stages []struct {
FragmentShaderPath string `yaml:"fragmentShaderPath"`
Textures []TextureDefinition
Uniforms []UniformDefinition
}
}
func LoadDefinition ¶
func LoadDefinition(definitionString []byte) (definition Definition, err error)
func LoadDefinitionFromFile ¶
func LoadDefinitionFromFile(reader io.Reader) (definition Definition, err error)
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) GetLastRenderImage ¶
func (*Engine) Init ¶
func (engine *Engine) Init(stages []*FilterStage) (err error)
type FilterStage ¶
type FilterStage struct {
// contains filtered or unexported fields
}
func NewFilterStage ¶
func NewFilterStage(fragmentShaderSource string, textures []Texture, uniformDefinitions []UniformDefinition) (stage *FilterStage, err error)
type TextureDefinition ¶
type TextureDefinition struct {
Path string
Name string
Filter TextureFilterType
}
type TextureFilterType ¶
type TextureFilterType int32
func (*TextureFilterType) UnmarshalYAML ¶
func (filterType *TextureFilterType) UnmarshalYAML(unmarshal func(interface{}) error) (err error)
type Uniform ¶
type Uniform struct {
Type UniformType
Value interface{}
}
type UniformDefinition ¶
type UniformDefinition struct {
Name string
Type UniformType
Value interface{}
}
type UniformType ¶
type UniformType struct {
ScalarType ScalarTypeName
VectorSize int
IsArray bool
}
func (*UniformType) UnmarshalYAML ¶
func (uniformType *UniformType) UnmarshalYAML(unmarshal func(interface{}) error) (err error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.
