Documentation ¶
Index ¶
- func DestroyShaderProgram(shaderProgram ShaderProgram)
- func DestroyTexture(texture Texture)
- func RunVisualization(notes *synth.NoteArrangement, oNoteChannel chan synth.DelayedNoteData) error
- func Testing() error
- type Assets
- type Color
- type LineRender
- type Point
- type RenderObject
- type Shader
- type ShaderProgram
- type Texture
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DestroyShaderProgram ¶
func DestroyShaderProgram(shaderProgram ShaderProgram)
Destroying a ShaderProgram.
func RunVisualization ¶
func RunVisualization(notes *synth.NoteArrangement, oNoteChannel chan synth.DelayedNoteData) error
Runs the visualization with a set of DelayedNoteData. The DelayedNote data is used to push information to the synth as well as represent the data visually.
Types ¶
type Assets ¶
type Assets struct { Programs map[string]ShaderProgram Textures map[string]Texture }
An amalgimation of assets one can use to
func NewAssets ¶
Constructing a new Assets out of the list of ShaderProgram paths and Texture paths.
func (*Assets) Destroy ¶
func (a *Assets) Destroy()
Destroying the set of assets contained within an Assets.
func (*Assets) GetProgram ¶
func (a *Assets) GetProgram(path string) (ShaderProgram, error)
Accessing a program within the asset manager.
type Color ¶
A type to define color.
type LineRender ¶
type LineRender struct {
// contains filtered or unexported fields
}
Type LineRender holds all of the data necessary to render a set of lines.
func NewLineReaderEmpty ¶
func NewLineReaderEmpty(shaderProgram ShaderProgram, color Color, static bool, weight float32) *LineRender
Creating an empty LineReader.
func NewLineRender ¶
func NewLineRender(shaderProgram ShaderProgram, color Color, static bool, weight float32, points []Point) *LineRender
Creating a LineReader with an initial list of points.
func (*LineRender) Destroy ¶
func (lr *LineRender) Destroy()
Cleaning up the memory from a LineReader.
func (*LineRender) UpdatePoints ¶
func (lr *LineRender) UpdatePoints(points []Point)
Updating the list of Points that this LineRender should be rendering.
type Point ¶
Type Point refers to an (x, y) pair representing location in 2d space.
func DefaultGenerateSinePoints ¶
Only for testing purposes.
func GenerateSinePoints ¶
Generating a slice of points from a set of information.
freq - The frequency of the sine wave. initialY - The initial y-axis value of the sine wave. fidelity - The sample rate to emulate. pointsLength - The number of points to generate. width - The width of the render window.
type RenderObject ¶
type RenderObject struct {
// contains filtered or unexported fields
}
Type RenderObject is used to concisely represent information necessary to perform a 2 dimensional textured render.
func CreateRenderObject ¶
func CreateRenderObject(shaderProgram ShaderProgram, texture Texture, vertices []float32) *RenderObject
Creating a RenderObject with a given shaderProgram, texture, and set of vertices.
func (*RenderObject) Destroy ¶
func (renderObject *RenderObject) Destroy()
Destroying the resources of a RenderObject.
func (*RenderObject) Render ¶
func (renderObject *RenderObject) Render()
type ShaderProgram ¶
type ShaderProgram uint32
func LoadShaderProgram ¶
func LoadShaderProgram(path string) (ShaderProgram, error)
Attempting to load a ShaderProgram from a given location on the disk. It looks for file starting at the path, and then with the respective suffixes of .vert, .frag, and .geom.