shader

package
v0.0.0-...-7483609 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package shader shaderprogram.go Defines a shader type that will be used by opengl.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Shader

type Shader uint32

Shader used to interact with an opengl shader.

func CreateShader

func CreateShader(vertexShaderSource, fragmentShaderSource string) *Shader

CreateShader used to create a shader from the given source.

func (*Shader) BindFragDataLocation

func (s *Shader) BindFragDataLocation(loc string)

BindFragDataLocation Sets the variable from which the fragment shader draws its result.

func (*Shader) GetAttributeLocation

func (s *Shader) GetAttributeLocation(name string) uint32

GetAttributeLocation Gets the location of the variable name in the shader.

func (*Shader) GetUniformLocation

func (s *Shader) GetUniformLocation(name string) int32

GetUniformLocation Gets the location of the uniform variable name in the shader.

func (*Shader) Use

func (s *Shader) Use()

Use Sets this shader as the active one.

Jump to

Keyboard shortcuts

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