rendering

package
v0.0.0-...-2a9dfdc Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package rendering defines features of shaders.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShader

func NewShader(vertexSrc, fragmentSrc string) api.IShader

NewShader creates a blank shader. You must call Load before that shader is valid.

func NewShaderFromCode

func NewShaderFromCode(vertexCode, fragmentCode string) api.IShader

NewShaderFromCode creates a blank shader - you must call Compile before that shader is valid.

Types

type Shader

type Shader struct {
	// contains filtered or unexported fields
}

Shader represents a shader program

func (*Shader) Compile

func (s *Shader) Compile() error

Compile compiles shader programs

func (*Shader) Load

func (s *Shader) Load(relativePath string) error

Load reads and compiles shader programs

func (*Shader) Program

func (s *Shader) Program() uint32

Program returns the shader's program id

func (*Shader) Use

func (s *Shader) Use()

Use activates program

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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