shader

package
v0.0.0-...-8c305e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

package shader assists with creating GLSL programs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(shaders *[]Info) (uint32, error)

Load the shaders, returning the ID of the resulting program. Any problems compiling or linking will result in an error.

func LoadSeparable

func LoadSeparable(shaders *[]Info) (uint32, error)

LoadSeparable is the same as Load with the exception that before the link stage GL_PROGRAM_SEPARABLE is set to GL_TRUE.

Types

type Info

type Info struct {
	// Type of shader: gl.VERTEX_SHADER, gl.FRAGMENT_SHADER, ...
	Type uint32
	// Filename of shader source file.
	Filename string
	// contains filtered or unexported fields
}

Info representing a shader.

func (*Info) Compile

func (i *Info) Compile(program uint32) error

Compile the shader using the info provided.

func (*Info) Delete

func (i *Info) Delete()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL